Jul 17, 2013 at 1:00pm UTC
char *a;
a = "Hello world";
Jul 17, 2013 at 1:03pm UTC
dont get it...
*a means a pointer that points to a...why is that?
Jul 17, 2013 at 1:22pm UTC
what a char * actually is:
{'H', 'e', 'l', 'l' /*etc, etc*/} however in c(++) we are allowed to treat it kind of like a string type upon initialization.
Jul 17, 2013 at 1:33pm UTC
char means single, value.
such as
a
b
c
"Hello World" is a string of charcters.
You can use it with a string, or a char array
string mystring;
or
char mystring[11];
In the last example mystring[1] is equal to the single char "H".
Jul 17, 2013 at 1:40pm UTC
I know now. thanks for your explaination.