+ 1

How works char* ?

the c++ challenge have some queations about this like: char* var = "abc"; char* var2 = ++var; return *var2;

17th Nov 2016, 5:18 PM
David Ibáñez Valenzuela
David Ibáñez Valenzuela - avatar
1 Resposta
+ 1
I undestand char* now is a pointer of an character into a "string" and ++var move the pointer one character to the right. if we dont use the * before the variable name it return all the characters from the actual pointing character ot the last.
17th Nov 2016, 5:57 PM
David Ibáñez Valenzuela
David Ibáñez Valenzuela - avatar