I'm just getting started to learn C language by creating small programs.
Now, I'm in the middle of creating a program that require either struct or something global, because later on somewhere in my function I just want to call them directly.
I prefer not to use struct because I'm afraid that it will increase the chance of seg. fault somewhere between lines of code.
My question is: Are these two the same?
struct myTrialStruct{
char *trialOne;
char *trialTwo;
char *trialThree;
};
and
extern char *trialOne;
extern char *trialTwo;
extern char *trialThree;
char *trialOne;
char *trialTwo;
char *trialThree;
If not, can somebody tell me the proper way to create a global char pointer without having me to create a struct?