in all the book i have on C use this example (in they're own way) but why am i getting this error
do i need to set something or add a lib to the compiler?
books C for Dummies
Teach Yourself C
& some on-line docs
thanx for any help
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
i tried using the following
ex
struct tNewStruct{
int a;
int b;
int c;
}NewStruct, *ptrNewStruct;
NewStruct tTempStruct;
NewStruct *ptrTempStruct;
GotoThisCall((ptrTempStruct)&tTempStruct) <-invalid operands to binary &
void GotoThisCall(ptrNewStruct NewStruct)
{
....;
}
in all the book i have on C use this example (in they're own way) but why am i getting this error
do i need to set something or add a lib to the compiler?
books C for Dummies
Teach Yourself C
& some on-line docs
thanx for any help
Umm, not sure if I'll be any help here, as I've been learning C++, but I do have a question for you:
Maybe it changed in C++, or maybe I'm looking at it wrong, but your structure's name is: tNewStruct
and you made an object to it called: NewStruct.
Now, under your structure, it looks like you are using the object to make another object, and a pointer:
NewStruct tTempStruct;
NewStruct *ptrTempStruct;
Now, if that's indeed what you are doing, then shouldn't it be:
tNewStruct tTempStruct;
tNewStruct *ptrTempStruct;
You make objects to your class, not other objects.
If this helps... Hooray!
If not, sorry... I tried sniff :( ( lol )
Good luck,
-Malciah