struct YourStruct
{
// some data members
};
// Using pointer
void YourFunc(YourStruct* s)
{
// use s
}
// Using reference
void YourFunc(YourStruct& s)
{
// use s
}
int main()
{
YourStruct ys;
// call func with pointer
YourFunc(&ys);
// call func with reference
YourFunc(ys);
}