Page 1 of 1

PostPosted: Fri Jan 31, 2003 3:51 pm
by Red_as_blood
Hi every body i have a question:

I need made a funtion similar to gets() but with 2 editboxes. I this way i need to return 2 values (for example x1,y1)

is this possible because i don't know how to do...

i explane my self:


my_func(string title)
//components on the screen
//some calculations

return x1;
return y1;

int variable;

variable=my_func("Enter Coordinates")

//set the pixel on the screen with the 2 variables returned by the function


How do i get back from my function 2 variables

on the example code i just made you can return only one variable how can i do?

Sombody can explane or give me another solution??

PostPosted: Fri Jan 31, 2003 6:10 pm
by wolfgang
You can do this by passing in the return variables as pointers in the functrion parameter list, or by returning a pointer to an array. Read the chapters about pointers in PocketC on my webpage (the ABC in the programming section) for more details.

There is a good, recent thread on this in the PalmOS PcoketC forum:


Composing music on the PocketPC! -