First of all, i know i should only post psp programming specific questions, but i have this simple programming problem of which i can't find anything on the net and i tried looking on this forum and could only find this: http://forums.ps2dev.org/viewtopic.php? ... ht=classes but that did not work.
I want to use classes in my game but i get these errors:
syntax error before 'Level'
syntax error before '{' token
syntax error before ':' token
here is my Level.cpp code:
Code: Select all
void Level::Render()
{
// render code
}
void Level::Translate()
{
//translate code
}
Code: Select all
class Level{
public:
void Render();
void Translate();
private:
int x,y
};
Code: Select all
TARGET = out
OBJS = $(wildcard *.c)
INCDIR =
CFLAGS = -O2 -G0 -Wall -g
CXXFLAGS = $(CFLAGS) -fno-exceptions -fno-rtti -g
ASFLAGS = $(CFLAGS)
LIBDIR =
LDFLAGS =
LIBS = -lstdc++ -g -lpspgu -lpng -lz -lm -lpsputility -lpsprtc -lmad -lpspaudiolib -lpspaudio -lpsppower -lmikmod
PSPSDK=$(shell psp-config --pspsdk-path)
include $(PSPSDK)/lib/build.mak
greets ghoti
PS i use Visual C++[/code]