Hi I just wanna know what is wrong in my program I'm a little bit confused using FUNCTION... Thank you...
#include<iostream>
#include<cstring>
using namespace std;
struct Name{
char* names;
int grades;
};
int main(){
int a, Jo;
Name John;
Name Alvin;
John.names;
John.grades;
Alvin.names;
Alvin.grades;
std::cout<<"Student Name: ";
cin>>John.names;
cout<<endl;
std::cout<<"Student Grade: ";
cin>>John.grades;
cout<<endl;
std::cout<<"Student Name: ";
cin>>Alvin.names;
cout<<endl;
std::cout<<"Student Grade: ";
cin>>Alvin.grades;
cout<<endl<<endl;
std::cout<<" RESULT!! "<<endl;
for(int e=20;e<0;e++){
cout<<"*";
}
cout<<"======================================"<<endl;
cout<<"| Student Name | Grade |"<<endl;
cout<<"|=================|==================|"<<endl;
cout<<"| "<<John.names<< " | "<<John.grades<<" |"<<endl;
cout<<"|=================|==================|"<<endl;
cout<<"| "<<Alvin.names<<" | "<<Alvin.grades<<" |"<<endl;
cout<<"|_________________|__________________|"<<endl;
}