Can someone please explain to me what I am doing wrong? I am trying to make a simple class:
class Quad {
protected:
int X;
int Y;
public:
void SetValues(int x, int y) { X, Y = x, y; };
};
And when I make a new Quad:
Quad Billy;
Billy.SetValues(5,5);
But every time I try to compile, I get these errors:
1>c:\users\matt\documents\visual studio 2008\projects\ustest\ustest\objects.h(10) : error C2143: syntax error : missing ';' before '.'
1>c:\users\matt\documents\visual studio 2008\projects\ustest\ustest\objects.h(10) : error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>c:\users\matt\documents\visual studio 2008\projects\ustest\ustest\objects.h(10) : error C2371: 'Billy' : redefinition; different basic types
1> c:\users\matt\documents\visual studio 2008\projects\ustest\ustest\objects.h(9) : see declaration of 'Billy'
If I asked you for a hundred dollars would the answer to that question be the same as the answer to this question?