Question:
Weird C Compiler Problem?
chris b
2009-04-24 16:46:26 UTC
I'm making this game in C and I compiled and ran it and everything went fine. I made one little change (to a part unrelated to the compiler warnings) and now I'm getting all these warnings for code like this (logic not important):

b.x = p.x;
b.y = p.y;
b.vx = 0;
b.vy = 0;

199 C:\Dev-Cpp\new.c request for member `x' in something not a structure or union

199 C:\Dev-Cpp\new.c request for member `y' in something not a structure or union

etc, etc.


But I HAVE declared the structure above main and it was working before:


struct BALL{
int x;
int y;
int vx;
int vy;
}b;

Any ideas what is going on?
Three answers:
hotwheelsbeatthat64
2009-04-24 16:55:12 UTC
it is confusing me so much i fainted! dude happens all the time. wait does the game still work?
?
2016-12-05 19:03:57 UTC
i think of you would be able to desire to verify your "javac" path on abode windows making use of abode windows Explorer "C:application FilesJavajdk1.7.0_02bin" and replica the handle. or you would be able to desire to reinstall the javac.
anonymous
2009-04-24 16:54:24 UTC
What is p defined as?



Edit: What? b is not a pointer.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...