When declaring a struct you need to add a semicolon after the declaration, for example:
Code:
struct data
{
int id;
}; <-- notice the semicolon
Also you've declared the data type being passed to your print function, but not its name. Use this instead:
Code:
void print(data currentdata)
{
cout<<"ID: " <<currentdata.id <<"\n" <<"Age: " <<currentdata.age << "\n" <<"Phone: " <<currentdata.phone;
}
Try reading the compiler error messages, they are usually pretty handy at identifying the source of the problem even though its quite difficult at first.