passing struct to function by reference
Hey again another question. How can I pass a struct to a function by reference.
Code:
int myfunction(*)
{
// will do stuff to struct
return 0;
};
int main()
{
struct data
{
int a;
int b;
int c;
};
data d;
myfunction(*);]
return 0;
}
This is just example code of course. What is it that I need to put in the place of the *'s? Reading from a book the way to pass a variable by reference is (myVar &hisVar). Is this correct? If not what is. What bit do I need to put where. I am very confused. I may be jumping ahead of myself but I find if I don't try adn get the complicated bits done I get bored and give up. I can wite hello world in lots of languages but can't do anything useful in any of them.
Thanks
Ironfistchamp