Why does this a.x=entery; only work in int main() and not any other function?
Why does this a.x=entery; only work in int main() and not any other function?
OS:- XP
Compiler:- MSVC++ 6 or DJGPP or Dev-c++ (Mingw)
Did you declare your structure as global or local? If its only local then make it global, that might do it.
http://uk.geocities.com/ca_chorltonkids
No my structure is global
OS:- XP
Compiler:- MSVC++ 6 or DJGPP or Dev-c++ (Mingw)
Post some code.
Try not.
Do or do not.
There is no try.
- Master Yoda
Variable entery is also global?
Variable a is a structure and not a pointer to it?
Variable a has a member x?
In other words, give some more details on how a is declared and defined. Also check variable entery. Some more code would be useful.
When I was trying to write to a.x in a function I had declared a char variable before it in the same function and this seemed to mess it up. When i took the char variable out it worked!
Does anyone have any resons why?
OS:- XP
Compiler:- MSVC++ 6 or DJGPP or Dev-c++ (Mingw)
Not without seeing the code, unless you want someone to make an educated guess.
When all else fails, read the instructions.
If you're posting code, use code tags: [code] /* insert code here */ [/code]
It doesn't matter anymore I have a bigger problem click here
Thanks anyway for the help
OS:- XP
Compiler:- MSVC++ 6 or DJGPP or Dev-c++ (Mingw)