Actually, what you’ve shown is all just good ol’ C - it hasn’t strayed into any C++ territory (yet)…
For that, you need a ‘C’ textbook!
You could start with publications.gbdirect.co.uk/c_book/
Note that a pointer is a variable - the value of a pointer variable is the address of something and, because it’s a variable, you can change that value at run time; ie, you can assign a new value to it.
The name of an array acts, in many ways, like a pointer - because it gives the address of the 1st element of the array - but the key difference is that you cannot assign a value to it. Its value is fixed at build time.
Also note that “==” is not the assignment operator in ‘C’ !
The “==” double-equals is a comparison operator that checks if its two operands are equal!
Thus this code contains two mistakes:
temp15==strncpy(&gpsbuff[startp],temp15,len); // This is not an assignment, and would be illegal as an assignment!
- You are trying to assign to an array name - which is not allowed;
- You are using the equality comparison operator (==) instead of the assignment operator (=)