what's the different between wchar_t and string?
thanks
Last edited on
wchar_t is a data type and string is class to manipulate characters
can char have more than one character ?
can char have more than one character ? |
No as
char
is one character but you can create an array
eg:
char array[] = "Hello!";
EDIT: Submitted too late
Last edited on
char *g="asdf";
why does it legal/ what is the value of g, after char *g="asdf";
It makes g pointing to a constant array generated by the compiler.
The value of g would be the location of the character 'a' of that array.
What about
char c = '1234';
Bwah hah ha hah haaah!
BTW. Don't use multi-character constants. They're evil.
;-)