Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

264
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda