I am trying different ways of working with struct values but all of them give me error. So, I have the following global struct:
struct Car_ {
char *currentCar;
char **cars;
}carPars;
then I am truing to assign *currentCar member to point to the first array of **cars. I am doing it in the following way:
tokenizer->currentToken = tokenizer.tokens[0];
This tells Member reference type 'struct TokenizerT_' is not a pointer; maybe you meant to use '.'?
Then I try in this way
carPars.currentCar = carPars.cars[0];
but when I run my program this actually gives me EXC_BAD_ACCESS (this usually means segmentation fault).
Then I try :
(*curPars).currentCar = (*car).currentCar[0];
but then I have - Indirection requires pointer operand
How would I do it in correct way?