Hi,
I am fairly new to programming using structs in C and I get the following when trying to assign a value to a member variable of type struct. Any inputs on getting this addressed will be much appreciated.
Here is the code for the program I am using:The specific error message is Run-TIme Check Failure #3 - The variable emp2 is being used without being defined.Code:int _tmain(int argc, _TCHAR* argv[]) { struct employee { char name[30]; int emp_id; float salary; }; struct employee *emp2; emp2->emp_id = 3456; // error occurs here return 0; }
Thanks,
Manisha