Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

272
Vistas
I want to make a text converter to unicode converter. The code was going pretty well but I am stuck at changing as '\' is shown invalid
else if (arr2[i] == ']') {
  mainarr.push('े')
} else if (arr2[i] == '}') {
  mainarr.push('ै')
} else if (arr2[i] == '\') {
  mainarr.push('्')
}

I want to make a text converter to Unicode converter. The code was going pretty well but I am stuck at changing as '' is shown invalid. Any way I can type '/'?

about 4 years ago · Juan Pablo Isaza
1 Respuestas
Responde la pregunta

0

Backslash is often interpreted as an "indication of literal next" - meaning that the next character should NOT be interpreted. In the case above, I would guess that the compiler (and your IDE) is thinking that you meant to say that the single quote is literal.

To fix, make it a double backslash (aka, a literal backslash):

} else if (arr2[i] == '\\') { 
about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda