Page 1 of 1

PostPosted: Tue Jul 29, 2003 5:29 pm
by Glasswalker
Ok... having an odd issue...

Code that worked perfectly last time I used it.

I compiled it and ran it, it runs fine...

I save file, and close pocketc

then a week later, I open it, and try to compile...

It fails...

I don't understand! :) hehehehe

it is giving me "Missing function body" errors for any function that is declared in the beginning of the file that has a struct passed to it...

This code all worked before... and now with not a single change (I literally have not touched my hpc since I last compiled the code, I compiled, saved, exited, and shut the machine off. did not touch it since)

If I delete the function declaration, it will compile fine, but only if my functions are declared in the right order so that they have been defined before they are called... Which I can't do in this case...

Anyone know anything about this?

(I know it is not a simple typo, I create a blank program with a simple struct and a simple function that just pulls a string from the struct and bumps it on screen, same deal... but if I delete the declaration at the top, it runs fine)

please! need help! :)


PostPosted: Wed Jul 30, 2003 9:47 am
by guy
How do you pass the struct to the function?

You need to pass a reference I think, memory fails me...

struct test {
int a ;
int b ;
} ;

tester(struct test & c) {
c.a = 1 ;
c.b = 2 ;

PocketC CE API interface:
PCForm and CE API forum: