Hello,
Compiling on windows using GNC GCC Codeblocks.
I have a structure as follows.
I am using wondering if this is the correct way to assign a value to the index which is a pointer.
Just another question. Is there any response to having a pointer like this? What is the most common situation where one would be used?
Many thanks,
Compiling on windows using GNC GCC Codeblocks.
I have a structure as follows.
I am using wondering if this is the correct way to assign a value to the index which is a pointer.
Code:
struct lineService
{
int lineNumber;
char lineName[80];
int *index;
} line1;
int lineIndex = 10;
line1.index = lineIndex;
Just another question. Is there any response to having a pointer like this? What is the most common situation where one would be used?
Many thanks,