Page 1 of 1

PostPosted: Wed Jan 16, 2002 4:28 am
by brankin
Does PocketC support structures? I've tried
struct name {
int a; float b;
};
but it doesn't seem to work.

PostPosted: Wed Jan 16, 2002 11:40 am
by degv
Just drop the struct command.

ie

hello{
int a,b;
string hi="hello";
}

PostPosted: Wed Jan 16, 2002 1:09 pm
by jstadolnik
You can fake structures out in PocketC with arrays, which can be of mixed data types (ints, strings, floats, and chars).

See the PocketC built-in malloct function and the Array function in the PToolbox library.

Joe

The PToolboxLib guy.
http://www.geocities.com/retro_01775/PToolboxLib.htm