Hi:
How would I create a pointer to a String in C?
thanks in advance.
Hi:
How would I create a pointer to a String in C?
thanks in advance.
A pointer to a string is just a pointer to char that ends up pointing to a sequence of characters in memory ending with nul.Code:char *p = "some string literal";
My best code is written with the delete key.
But how would I create a pointer that will be pointing to a string but it is initialized to null?
>But how would I create a pointer that will be pointing to a string but it is initialized to null?
Then later you can point it wherever you'd like.Code:char *p = NULL;
My best code is written with the delete key.
alright...thanks alot!