Search found 8 matches

by johnbo
Thu Jan 12, 2006 1:19 am
Forum: PSP Development
Topic: dynamic memory allocation problem, please help
Replies: 14
Views: 3642

thanks urchin, that got me going, the malloc thing works now, but the libc++thing, does it come with the SDK etc, as LuMo says
by johnbo
Thu Jan 12, 2006 12:00 am
Forum: PSP Development
Topic: dynamic memory allocation problem, please help
Replies: 14
Views: 3642

ok, so im trying now to use malloc to allocate the memory or the list but its still giving me trouble, this is what im doing: struct ListNode* lroot; // create pointer to node structure lroot = malloc(sizeof( struct Listnode)); // reserve memory the size of size ListNode but it complains saying: inv...
by johnbo
Wed Jan 11, 2006 11:05 pm
Forum: PSP Development
Topic: dynamic memory allocation problem, please help
Replies: 14
Views: 3642

unfortunately that didnt work, ive tried putting everything in a single file and compling and i still get the same error. it doesnt undersand 'new'. whats going on, C++ does use this keyword doesnt it, has it been left out of the pSPSDK or something i really dont get it. Anyone please help, his is r...
by johnbo
Wed Jan 11, 2006 10:25 pm
Forum: PSP Development
Topic: dynamic memory allocation problem, please help
Replies: 14
Views: 3642

Ok still having trouble, I have changed all files to cpp insead of c (although i havnt touched .h files) and now i ill compile mostly except for a single error: main.cpp:(.text+0x6d0): undeclared reference to 'operator new(unsigned int) my structs now look like this: typedef struct MapPoint { int x,...
by johnbo
Wed Jan 11, 2006 9:52 pm
Forum: PSP Development
Topic: dynamic memory allocation problem, please help
Replies: 14
Views: 3642

actually changing main.c to main.cpp made it act differently, it didnt complain about new but it couldnt find loads of other files, specifically from graphics.h and graphics.c. do these also have to be cpp to be compiled?
by johnbo
Wed Jan 11, 2006 9:37 pm
Forum: PSP Development
Topic: dynamic memory allocation problem, please help
Replies: 14
Views: 3642

i think your onto something here, im no expert with gcc+g++ more of a vsnet man. However still having trouble fixing. Changing the extension causes the compiler to not recognise the file and report that there is nothnig to be made. Also there are several C files to be compiled in the project, i susp...
by johnbo
Wed Jan 11, 2006 12:36 pm
Forum: PSP Development
Topic: dynamic memory allocation problem, please help
Replies: 14
Views: 3642

dynamic memory allocation problem, please help

Hi can anyone help me please, im trying to make a linked list to store info for a pathfinding algorithm, i have some structs to hold info: // node info structure typedef struct { int f, g, h; // pathfinding evaluation parameters MapPoint parent; // parent square int state; // indicates whether squar...
by johnbo
Wed Jan 11, 2006 12:35 pm
Forum: PS2 Development
Topic: dynamic memory allocation problem, please help
Replies: 1
Views: 1275

dynamic memory allocation problem, please help

Hi can anyone help me please, im trying to make a linked list to store info for a pathfinding algorithm, i have some structs to hold info: // node info structure typedef struct { int f, g, h; // pathfinding evaluation parameters MapPoint parent; // parent square int state; // indicates whether squar...