I haven't coded c++ for more than 5 years and need some help. I got following code and can't tell if the "*" is pointer or it's something else, especially the line *token = strtok(buffer, " \t");
Could you please give me a explaination of what each line does.
As i stated earlier, I haven't coded c++ for more than 5 years and need some help. I got code and can't tell if the "*" is pointer or it's something else, especially the line *token = strtok(buffer, " \t");
I need help understand this specific code so i can start working with it right away. I know how to declare a pointer, but from the code i posted above, i can't tell.
Could you please give me a explaination of what each line does.
The line is not *token = strtok(buffer, " \t");, the line is char *token = strtok(buffer, " \t"); which is in the form TYPE * NAME.
It is declaring token as a pointer to char, then getting a value from strtok.
If you want to know how strtok works see the link I gave you: http://www.cplusplus.com/reference/clibrary/cstring/strtok/