Hello ... I am trying to pass a struct to a function like this
Code:
typedef struct
{
float longitude; // logitude in degree /min/ sec
float latitude; // latitude in degree / min /sec
float height; // height of the antenna in degree
BOOLEAN valid;
}raw_coord;
Code:
void get_data(raw_coord)
{
// some code here
raw_coord->longitude = 1.0;
}
and I get the following error :
previous identifier must be a pointer
I also have tried this
Code:
// normal c / c++
void get_data(raw_coord * x)
{
x->longitude = 1.0;
}
but the compiler did not like it
Is it possible to pass a struct (by reference) to a function with this compiler ?
please help ... I am getting insane
Thank you in adnvance
mp3fusion
Haplo
Joined: 06 Sep 2003 Posts: 659 Location: Sydney, Australia
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum