I am trying to wrap my noodle around the whole pointer concept here. I want call the function fun1 with a pointer. What syntax do I use? What I doing wrong?
I get this error when I try to compile
Code:
boohoo.cpp: IN function 'int main(int, char**)':
boohoo.cpp 21: error: expected primary-expression before ')' token
Code:
#include <iostream>
using namespace std;
struct myStruct
{
long * stuff1;
long stuff2;
long stuff3;
};
void fun1(myStruct* workplz);
int main(int argc, char* argv[])
{
myStruct workplz;
fun1(workplz*);
}//end main
void fun1 (myStruct* workplz)
{
cout<<"it works."<<endl;
}
any help would be great