Page 1 of 1

PostPosted: Mon Jun 30, 2003 10:17 am
by martinsollert
In PocketC it is obviously possible to program structures.

struct tagProduct {
string name;
int amount;

#define Product struct tagProduct

Product pr;

main() { = "car";
pr.amount = 100;

But in the documentation of PocketC one is not able to find anything about this subject.
Where can I find a documentation about really all program possibilities of PocketC ???

PostPosted: Thu Jun 21, 2007 6:41 pm
by sid
I agree the documentation is but I suppose it's free.

Thanks for the stuff on structures I didn't even try them since it wasn't in the documentation - but I'll try them now!

PostPosted: Thu Jun 21, 2007 7:01 pm
by sid
just tried your code and I get a syntax error when defining the pointer pr ?

PostPosted: Thu Jun 21, 2007 8:12 pm
by sid
Update: just found out that pocketc will only accept #define with constant values so #define Product Struct prodtag; etc won't work!

Also no way of using pointers with structures - so link lists are out. try using -> it just confuses the compiler.

Any updates on this would be gratefully received!