what's wrong in this problem/program? this code cannot be run in borlan c++..??
#include <iostream.h>
#include <cstring.h>
#include<fstream.h>
#include<string.h>
main ()
{
string name = "";
string course = "";
string id = "";
string year = "";
int x;
string surname = "";
string mid = "";
string subject = "";
string subject1 = "";
string subject2 = "";
string subject3 = "";
string subject4 = "";
string subject5 = "";
string subject6 = "";
cout << "\t\t\t***Student Details***\n\n";
int True=1;
while(True)
{cout << "\n\n\t\t\t(1) for Register\n";
cout <<"\t\t\tAlready have account? (2) for Log In: ";
cin >> x;
cout<<"(3) Enter to Display Student Information List";
cin>>x;
cout << "\n\n";
if (x==1)
{
cout << "Enter Student's ID no: ";
cin >> id;
cout << "\nMust be all Capitalized!\n";
cout << "\n\t\tName: ";
cin >> name;
cout << "\n\t\tLast Name: ";
cin >> surname;
cout << "\n\t\tMiddle Initial: ";
cin >> mid;
cout << "\n\t\tCourse: ";
cin >> course;
cout << "\n\t\tYear: ";
cin >> year;
cout << "\n\nSubject Taken: (ONLY MAJORS SUBJECT)\n";
cout << "Example: Section Code and Description\n";
cout << "Example: CSC1 CISCO1\n";
{
cin >> subject;
cin >> subject1;
cin >> subject2;
cin >> subject3;
cin >> subject4;
cin >> subject5;
cin >> subject6;
}
//cout << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
//cout << "\n\nStudent Details: ";
//cout << "\n\tID No: " << id;
//cout << "\n\tName: " << name;
//cout << "\n\tCourse: " << course;
//cout << "\n\tYear: " << year;
//cout << "\n\nSubject Taken: \n";
//cout << subject << " " << subject1 << "\n" << subject2 << " " << subject3 << "\n" << subject4 << " " << subject5 << " " << subject6;
ofstream outfile;
outfile.open("student.txt", ios::app);
if (outfile.is_open())
{
cout<<"Student ID No. : ";
getline(cin, id);
cout<<"Name: ";
getline(cin, name);
cout<<"Last name: ";
getline(cin, surname);
cout<<"Course: ";
getline(cin, course);
cout<<"Year: ";
getline(cin, year);
cout << "\n\nSubject Taken: \n";
cout << subject << " " << subject1 << "\n" << subject2 << " " << subject3 << "\n" << subject4 << " " << subject5 << " " << subject6;
outfile<<id<<"|"<<name<<"|"<<surname<<"|"<<course< <"|"<<year<<"|"<<subject<<"|"<<subject1<<"|"<<subj ect2<<"|"<<subject3<<"|"<<subject4<<"|"<<subject5< <<"|"<<subject6<<"|";
outfile.close();
}
else
cout<<"File cannot be opened." ;
}
else
{
cout << "Enter I.D no.: ";
cin >> id;
cout << "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~";
cout << "\n\nStudent Details: ";
cout << "\n\tID No: " << id;
cout << "\n\tName: " << name;
cout << "\n\tCourse: " << course;
cout << "\n\tYear: " << year;
cout << "\n\nSubject Taken: \n";
cout << subject << " " << subject1 << "\n" << subject2 << " " << subject3 << "\n" << subject4 << " " << subject5 << " " << subject6;
True=0;
}
}
}