pointer to struct
-
hi, um i am not sure if this is the right spot to post but i am having a small problem in c++. I have a class that holds a pointer to a struct. struct somestruct { someval }; class someclass { somestruct* pointer; }classpointer*; when i do this: classpointer->pointer->someval = something; i get a error i have no idea how to fix it thanks
-
hi, um i am not sure if this is the right spot to post but i am having a small problem in c++. I have a class that holds a pointer to a struct. struct somestruct { someval }; class someclass { somestruct* pointer; }classpointer*; when i do this: classpointer->pointer->someval = something; i get a error i have no idea how to fix it thanks
-
hi, um i am not sure if this is the right spot to post but i am having a small problem in c++. I have a class that holds a pointer to a struct. struct somestruct { someval }; class someclass { somestruct* pointer; }classpointer*; when i do this: classpointer->pointer->someval = something; i get a error i have no idea how to fix it thanks
to add to the other answer, I assume that point is actually allocated ? anyway, is it a compilation error or a runtime error ?
Maximilien Lincourt Your Head A Splode - Strong Bad