motorollin wrote:
bloodline wrote:
char* just means that the function wants a pointer to the string rather than passing the whole string (which would be slow)... You proabably should have referenced the string :-)
I really have no idea what any of that means... I'll just stick to basic ;-) I like programming because I enjoy thinking about the procedure and logic of how the application should work. What I don't like is the intricacies of the language getting in the way.
--
moto
Hehehe :-)
well, for those interested:
int A = 5; //means that the integer variable A = 5
int* B = &A; //means that variable B, now is a pointer to the integer variable A
All types with a * after them are memory addresses.
The "&" operator means, "The Address of"
If you pass a variable to a function, you will notice in the C code that the variable is actually copied to a new variable for use in the function... if you pass a pointer of the variable to the function instead, then the function will act upon the original variable rather than a copy of it!
If the function requires char* and your string is in an array (it is important to remember that a string is an array of characters)... then you need to reference your array with a preceding "&" operator.