Message from C, C++ discussions

November 2019

— Oh the fire 🔥 that one person can initiate

— 

# include <iostream>
# include <string.h>
# include <stdlib.h>
using namespace std;

class student
{
protected:
string firstname, secondname, thirdname, regNo, email,course;
double YOS;
int telNo;
public:
void setparameters(string m, string n, string o,string p,string q, string t, double r,int s)
{
firstname=m;
secondname=n;
thirdname=o;
regNo=p;
email=q;
course=t;
YOS=r;
telNo=s;

}

virtual void output()
{

}
};

class GIS : public student
{
void output()
{
system("cls");
cout<<"\nName:\t\t"<<firstname<<" "<<secondname<<" "<<thirdname<<endl;
cout<<"Reg-No:\t\t"<<regNo<<endl;
cout<<"E-mail:\t\t"<<email<<endl;
cout<<"Tel-No:\t\t"<<telNo<<endl;
cout<<"Course:\t\t"<<course<<endl;
cout<<"Y.O.S:\t\t"<<YOS<<endl<<endl<<endl;
}
};

class GEGIS : public student
{
void output()
{
system("cls");
cout<<"\nName:\t\t"<<firstname<<" "<<secondname<<" "<<thirdname<<endl;
cout<<"Reg-No:\t\t"<<regNo<<endl;
cout<<"E-mail:\t\t"<<email<<endl;
cout<<"Tel-No:\t\t"<<telNo<<endl;
cout<<"Course:\t\t"<<course<<endl;
cout<<"Y.O.S:\t\t"<<YOS<<endl<<endl<<endl;
}
};

class TELECOMMUNICATION ENGINEERING : public student
{
void output()
{
system("cls");
cout<<"\nName:\t\t"<<firstname<<" "<<secondname<<" "<<thirdname<<endl;
cout<<"Reg-No:\t\t"<<regNo<<endl;
cout<<"E-mail:\t\t"<<email<<endl;
cout<<"Tel-No:\t\t"<<telNo<<endl;
cout<<"Course:\t\t"<<course<<endl;
cout<<"Y.O.S:\t\t"<<YOS<<endl<<endl<<endl;
}
};



int main()
{
student S1;
GIS st1;
GEGIS st2;
TELECOMMUNICATION ENGINEERING st3;

student *ptr1= &st1;
student *ptr2= &st2;
student *ptr3= &st3;
student *ptr3= &S1;


string a,b,c,d,e,f;
int g,option;
double h;

system("color 0a");
cout<<"________________________________________________________"<<endl;
cout<<"COLLEGE OF ENGINEERING AND TECHNOLOGY"<<endl;
cout<<"________________________________________________________"<<endl;
cout<<"\n1. GEGIS\n2. GIS\n3. TELECOMMUNICATION ENGINEERING\n\n Choose your option::";
cin>>option;
cout<<"\n\n________________________________________________________"<<endl;

if(option==1)
{
system("cls");
cout<<"\n________________________________________________________"<<endl;
cout<<"GEOMATICS ENGINEERING AND GEOSPATIAL INFORMATION SYSTEMS"<<endl;
cout<<"\n________________________________________________________"<<endl;
cout<<"Firstname::";
cin>>a;
cout<<"Secondname::";
cin>>b;
cout<<"Lastname::";
cin>>c;
cout<<"Registration No::";
cin>>d;
cout<<"E-mail::";
cin>>e;
cout<<"Tel-No::";
cin>>g;
cout<<"Course::";
cin>>f;
cout<<"Y.O.S::";
cin>>h;
cout<<"\n\n________________________________________________________"<<endl;

cout<<"Record done"<<endl;

ptr2->setparameters(a,b,c,d,e,f,h,g);
ptr2->output();
}

else if(option==2)
{
system("cls");
cout<<"________________________________________________________"<<endl;
cout<<"\t GEOSPATIAL INFORMATION SYSTEMS"<<endl;
cout<<"________________________________________________________"<<endl;
cout<<"Firstname::";
cin>>a;
cout<<"Secondname::";
cin>>b;
cout<<"Lastname::";
cin>>c;
cout<<"Registration No::";
cin>>d;
cout<<"E-mail::";
cin>>e;
cout<<"Tel-No::";
cin>>g;
cout<<"Course::";
cin>>f;
cout<<"Y.O.S::";
cin>>h;
cout<<"\n\n________________________________________________________"<<endl;


cout<<"Record done"<<endl;

ptr1->setparameters(a,b,c,d,e,f,h,g);
ptr1->output();

}
if(option==3)
{
system("cls");
cout<<"\n________________________________________________________"<<endl;
cout<<"TELECOMMUNICATION ENGINEERING"<<endl;
cout<<"\n_______________________________________________________

— "<<endl;
cout<<"Firstname::";
cin>>a;
cout<<"Secondname::";
cin>>b;
cout<<"Lastname::";
cin>>c;
cout<<"Registration No::";
cin>>d;
cout<<"E-mail::";
cin>>e;
cout<<"Tel-No::";
cin>>g;
cout<<"Course::";
cin>>f;
cout<<"Y.O.S::";
cin>>h;
cout<<"\n\n________________________________________________________"<<endl;

cout<<"Record done"<<endl;

ptr3->setparameters(a,b,c,d,e,f,h,g);
ptr3->output();
}

else
{
cout<<"Error!! Wrong input.";
}

return 0;
}

Message permanent page

— Help.me.debug that kindly

— Well if an admin tells you to google, it is kinda stupid idea to report abuse...

— I can tell you , what is your question?

— What is the problem?

It would be nice if you put the code on something like hastebin.com

— Don't use this shit in your code, ever...

system("cls");

— Any alternatives ?

— This will not compile, why are you asking to debug?

class TELECOMMUNICATION ENGINEERING : public student
{

Message permanent page

— Actually there is no need to do this at all, but if you strictly need this, you can do what CLS does, manually, that is, output N empty lines where N = number of lines in a terminal, at maximum

Message permanent page

— ...okay help.me eliminate any errors/include what i have to