• Post Reply Bookmark Topic Watch Topic
  • New Topic

why char c=10 is legal but chars[i]=i raises 'Type mismatch: cannot convert from int to char'  RSS feed

 
Ines Mew
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
I've read that "characters are just 16-bit unsigned integers under the hood. That
means you can assign a number literal, assuming it will fit into the unsigned 16-bit
range (65535 or less)".

I don't understand why char c=10 is legal but chars[i]=i raises 'Type mismatch: cannot convert from int to char'.
Could anyone explain it?Thank you

 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!