include
include
using namespace std;
void printstudent(student *Student);
typedef struct { char name[50];
}student;
int main() { student student1; strcpy(student1.name,"Douglas Brown"); printstudent(&student 1); } void printstudent(student *Student) { cout<name<<endl; }
For better view :
So what are you asking ?? :S
i want to use this operator -> instead of . dot and wants pointer *Student instead.
As far as I understand you, you are having compilation error.
&student 1
. It should be&student1
.student
beforeprintstudent
prototype.Here is the correct one:
tnx