char vs wchar_t

Hi Guys

Can someone tell what the main difference between char and wchar_t is?

For example, if I want to loop through a String array and use the char then it will display back numbers but if I use the wchar_t then it returns letters. So I guess this is the main difference right?

Thanks
if I want to loop through a String array and use the char then it will display back numbers but if I use the wchar_t then it returns letters
What do you mean? Can you give a code example?

char is the basic character/byte type, while wchar_t is sometimes used for wide characters, like 'ü' or 'ñ', to support i18n. The problem with wchar_t is that it's not guaranteed to be of any particular size; in fact, it's not guaranteed to be any larger than char. This can cause problems when supporting very wide characters.
Other than this, there's no difference between the two. Although I'm not sure if the signedness of wchar_t is defined.
Topic archived. No new replies allowed.