?
Solved

text ouput problems.

Posted on 2005-03-30
3
Medium Priority
?
242 Views
Last Modified: 2010-04-01
I have created a resume program that asks the user for various input which i want to export to a testfile but i cannot get my current code to work and it is screaming about the ofstream i am using to export the code.

Could someone be nice enough to help me get this working without errors...please...

#include <iostream.h>
#include <stdlib.h>
#include <string>
#include <fstream>

int main()
{

      int index;
      //for the cover page or the intro info, cover page can be bypassed as with all sections addressed.
      char myName[1][20], myAddress[1][50], myCityZip[1][20], myPhone[2][13], myEmail[1][30]; //personal info.
      char bName[5][20], bAddress[5][30], bPhone[5][13]; //info of business addressed in resume.
      char POC[1][30]; //point of contact for default or both title and name of person being addressed in the business.
      char myStatement[1][50]; //for any opening remarks used to gain attention to the resume.
      char closing[1][50]; //closing statement.
      int test; //to test array close[] option.
      string FileName;

      //for the activities section.
      char myActivities[6][30];

      //for the education section.
      char mySchool[3][20];
      char myDegree[3][20];
      char myGdate[3][10];
      char myGPA[3][5];

      //for the experience portion of the resume.
      char myCompany[5][20];
      char myEmpDate[5][20];
      char myCityState[5][20];
      char myTitle[5][20];
      char myDuties[5][20];
      char mySummary[5][20];

      //for the skills section.
      char myNetworking[1][20];
      char myProgramming[1][20];
      char myHardware[1][20];
      char myGeneral[6][20];

      //for testing conditions to bypass or enter loops of the program.
      char re1, re2, re3, re4, re5, re6; //'re' for response in the first two sections of the resume builder.
      char re7, re8, re9, re10, re11, re12; //for the activities section.
      char re13, re14, re15; //for the education section.
      char re16, re17, re18, re19, re20, re21; //for the experience portion.
      char re22, re23, re24, re25, re26, re27, re28, re29, re30, re31; //for the skills portion.

      cout << "This program will guide you through a resume building process, please have your information handy. \n\nIf you would like to bypass any of the sections, you can do so when prompted. \n\n" << endl;
      cout << "This process will hold your information in an XML file to be read and \nedited later by another program, e.g. Note Pad, Word, Lotus 123, ect. " << endl;

      //prompt to start optional cover page.
      cout << "\nThe basic format for a resume starts with a cover page.\nIf you do not want to start a cover page, the program will ask for \nyour personal information and an opening statement." << endl;
      cout << "\nWould you like to create a cover page? (y/n) :  ";
      cin >> re1;
      system("cls");

      if (re1 == 'y'){
         cout << "\n\nPlease enter your name as you want it to appear at the beginning \nas well as the bottom of the cover page :  ";
         index = 1;
         cin.getline(myName[index], 20);

         system("cls");
         cout << "\n\nPlease note that there are two lines allowed for the addresses." << endl;
         cout << "\nPlease enter your street address :  ";
         cin.getline(myAddress[index], 50);

         system("cls");
         cout << "\n\nPlease enter the city, state and zip :  ";
         cin.getline(myCityZip[index], 20);

         system("cls");
         cout << "\n\nYou may also enter two contact numbers." << endl;
         cout << "\nPlease enter your primary home or cell phone number :  ";
         cin.getline(myPhone[index], 13);

         cout << "\n\nWould you like to include another phone number? (y/n) :  ";
         cin >> re2;
         system("cls");

         if (re2 == 'y'){
            index++;
            cout << "\n\nPlease enter your cell phone number :  ";
            cin.getline(myPhone[index], 13);
         }

         index = 1;
         cout << "\n\nWould you like to include your e-mail address as well? (y/n) :  ";
         cin >> re3;
         system("cls");

         if (re3 == 'y'){
            cout << "\n\nPlease enter your e-mail address :  ";
            cin.getline(myEmail[index], 30);
         }

         cout << "\n\nWould you like to enter the business information now? (y/n) :  ";
         cin >> re4;
         system("cls");

         if (re4 == 'y'){
            cout << "\n\nPlease enter the business name :  ";
            cin.getline(bName[index], 20);

            system("cls");
            cout << "\n\nPlease enter the business street address :  ";
            cin.getline(myAddress[index], 30);

            system("cls");
            cout << "\n\nPlease enter the city, state and zip :  ";
            cin.getline(bAddress[index], 30);

            system("cls");
            cout << "\n\nPlease enter the business phone number :  ";
            cin.getline(bPhone[index], 13);
         }

         cout << "\n\nFor the point of contact, if known, enter 'y', the default (n) will \nhold 'To Whom It May Concern;'.\n";
         cout << "\nPlease enter your response (y/n) :  ";
         cin >> re5;
         system("cls");

         if (re5 == 'y'){
            cout << "Please enter the title and name of the person to be addressed :  ";
            cin.getline(POC[index], 30);
         }

         cout << "\n\nWould you like to enter a short paragraph as the \nopening for the resume? (y/n) :  ";
         cin >> re6;
         system("cls");

         if (re6 == 'y'){
            cout << "\n\nPlease enter any remarks." << endl << endl;
            cin.getline(myStatement[index], 50);
         }

         cout << "\n\nWould you like to include a closing? (y/n) :  ";
         cin >> test;
         system("cls");

         if (test == 'y'){
            cout << "\nPlease enter your closing :  ";
            cin.getline(closing[index], 1);
         }
         //don't forget to print the myName string at the end as well for formality.
      }

      //if the user does not want to creat a cover letter, they can still enter their personal info and statement.
      else {
           index = 1;
           cout << "\n\nPlease enter your name :  ";
           cin.getline(myName[index], 20);

           system("cls");
           cout << "\n\nPlease note that there are two lines allowed for the address." << endl;
           cout << "\nPlease enter your street address :  ";
           cin.getline(myAddress[index], 50);

           system("cls");
           cout << "\n\nPlease enter the city, state and zip :  ";
           cin.getline(myCityZip[index], 20);

           system("cls");
           cout << "\n\nYou may also enter two contact numbers." << endl;
           cout << "\nPlease enter your primary home or cell phone number :  ";
           cin.getline(myPhone[index], 13);

           cout << "\n\nWould you like to include another phone number? (y/n) :  ";
           cin >> re2;
           system("cls");

           if (re2 == 'y'){
              index++;
              cout << "\n\nPlease enter your cell phone number :  ";
              cin.getline(myPhone[index], 13);
              system("cls");
           }

           index = 1;
           cout << "\n\nWould you like to include your e-mail address as well? (y/n) :  ";
           cin >> re3;
           system("cls");

           if (re3 == 'y'){
              cout << "\n\nPlease enter your e-mail address :  ";
              cin.getline(myEmail[index], 30);
           }

           cout << "\n\nWould you like to enter a short paragraph as the \nopening for the resume? (y/n) :  ";
           cin >> re6;
           system("cls");

           if (re6 == 'y'){
              cout << "\n\nPlease enter any remarks." << endl << endl;
              cin.getline(myStatement[index], 50);
           }
      }

      //now the activities step of the resume.
      cout << "\n\nWould you like to list the current activities you are involved in? (y/n) :  ";
      cin >> re7;
      system("cls");
      index = 1;

      if (re7 == 'y'){
          cout << "\n\nYou may list up to six activities.  Please enter your first activity :  ";
          cin.getline(myActivities[index], 30);
          cout << "\n\nWould you like to enter in another activity? (y/n) :  ";
          cin >> re8;
          system("cls");

          if (re8 =='y'){
             index++;
             cout << "\n\nPlease enter the next activity :  ";
             cin.getline(myActivities[index], 30);
             cout << "\n\nWould you like to enter another one in? (y/n) :  ";
             cin >> re9;
             system("cls");

             if (re9 =='y'){
                index++;
                cout << "\n\nPlease enter the next activity :  ";
                cin.getline(myActivities[index], 30);
                cout << "\n\nWould you like to enter another one in? (y/n) :  ";
                cin >> re10;
                system("cls");

                if (re10 =='y'){
                   index++;
                   cout << "\n\nPlease enter the next activity :  ";
                   cin.getline(myActivities[index], 30);
                   cout << "\n\nWould you like to enter another one in? (y/n) :  ";
                   cin >> re11;
                   system("cls");

                   if (re11 == 'y'){
                      index++;
                      cout << "\n\nPlease enter the next activity :  ";
                      cin.getline(myActivities[index], 30);
                      cout << "\n\nWould you like to enter another one in? (y/n) :  ";
                      cin >> re12;
                      system("cls");

                      if (re12 == 'y'){
                         index++;
                         cout << "\n\nPlease enter the next activity :  ";
                         cin.getline(myActivities[index], 30);
                      }
                   }
                }
             }
          }
      }

      index = 1;
      system("cls");
      //now the education section.
      cout << "\n\nWould you like to include your education? (y/n) :  ";
      cin >> re13;

      if (re13 == 'y'){
         cout << "\n\nIn this section, you can enter up to three schools.\nYou will be prompted for the name of the school, degree type, \nfinishing dates and GPA's.";
         cout << "\n\nPlease start with the last school you attended \nor are currently attending, then any previous schools." << endl;

         cout << "\nPlease enter the name of the school :  ";
         cin.getline(mySchool[index], 20);

         cout << "\n\nPlease enter the degree type gained :  ";
         cin.getline(myDegree[index], 20);

         cout << "\n\nPlease enter the graduation date or finishing date :  ";
         cin.getline(myGdate[index], 10);

         cout << "\n\nPlease enter the GPA :  ";
         cin.getline(myGPA[index], 5);

         cout << "\n\nWould you like to enter another school? (y/n) :  ";
         cin >> re14;
         system("cls");

         if (re14 =='y'){
            index++;
            cout << "\n\nPlease enter the name of the school :  ";
            cin.getline(mySchool[index], 20);

            cout << "\n\nPlease enter the degree type gained :  ";
            cin.getline(myDegree[index], 20);

            cout << "\n\nPlease enter the graduation date or finishing date :  ";
            cin.getline(myGdate[index], 10);

            cout << "\n\nPlease enter the GPA :  ";
            cin.getline(myGPA[index], 5);

            cout << "\n\nWould you like to enter another school? (y/n) :  ";
            cin >> re15;
            system("cls");

            if (re15 == 'y'){
               index++;
               cout << "\n\nPlease enter the name of the school :  ";
               cin.getline(mySchool[index], 20);

               cout << "\n\nPlease enter the degree type gained :  ";
               cin.getline(myDegree[index], 20);

               cout << "\n\nPlease enter the graduation date or finishing date :  ";
               cin.getline(myGdate[index], 10);

               cout << "\n\nPlease enter the GPA :  ";
               cin.getline(myGPA[index], 5);
            }
         }
      }

      system("cls");
      index = 1;
      //now the experience section.
      cout << "\n\nWould you like to enter information in the experience section? (y/n) :  ";
      cin >> re16;
      if (re16 == 'y'){
         cout << "\n\nYou are only allowed to enter six separate job positions.\nPlease enter the latest or current company first.";
         cout << "\n\nYou will be prompted for the name of the company, your beginning employee date,\nthe city and state worked from, ";
         cout << "the title of your position, your main duties \nand a brief summary of your experience." << endl;

         cout << "\nPlease enter the company name :  ";
         cin.getline(myCompany[index], 20);

         cout << "\n\nPlease enter the date of hire :  ";
         cin.getline(myEmpDate[index], 20);

         cout << "\n\nPlease enter the city and state of the company :  ";
         cin.getline(myCityState[index], 20);

         cout << "\n\nPlease enter you job title :  ";
         cin.getline(myTitle[index], 20);

         cout << "\n\nPlease enter your main duties :  ";
         cin.getline(myDuties[index], 20);

         cout << "\n\nPlease enter your brief summary of your experience there :\n";
         cin.getline(mySummary[index], 20);

         cout << "\n\nWould you like to add another company? (y/n) :  ";
         cin >> re17;

         system("cls");
         if (re17 == 'y'){
            index++;
            cout << "\n\nPlease enter the company name :  ";
            cin.getline(myCompany[index], 20);

            cout << "\n\nPlease enter the date of hire :  ";
            cin.getline(myEmpDate[index], 20);

            cout << "\n\nPlease enter the city and state of the company :  ";
            cin.getline(myCityState[index], 20);

            cout << "\n\nPlease enter you job title :  ";
            cin.getline(myTitle[index], 20);

            cout << "\n\nPlease enter your main duties :  ";
            cin.getline(myDuties[index], 20);

            cout << "\n\nPlease enter your brief summary of your experience there :\n";
            cin.getline(mySummary[index], 20);

            cout << "\n\nWould you like to add another company? (y/n) :  ";
            cin >> re18;

            system("cls");
            if (re18 == 'y'){
               index++;
               cout << "\n\nPlease enter the company name :  ";
               cin.getline(myCompany[index], 20);

               cout << "\n\nPlease enter the date of hire :  ";
               cin.getline(myEmpDate[index], 20);

               cout << "\n\nPlease enter the city and state of the company :  ";
               cin.getline(myCityState[index], 20);

               cout << "\n\nPlease enter you job title :  ";
               cin.getline(myTitle[index], 20);

               cout << "\n\nPlease enter your main duties :  ";
               cin.getline(myDuties[index], 20);

               cout << "\n\nPlease enter your brief summary of your experience there :\n";
               cin.getline(mySummary[index], 20);

               cout << "\n\nWould you like to add another company? (y/n) :  ";
               cin >> re19;

               system("cls");
               if (re19 == 'y'){
                  index++;
                  cout << "\n\nPlease enter the company name :  ";
                  cin.getline(myCompany[index], 20);

                  cout << "\n\nPlease enter the date of hire :  ";
                  cin.getline(myEmpDate[index], 20);

                  cout << "\n\nPlease enter the city and state of the company :  ";
                  cin.getline(myCityState[index], 20);

                  cout << "\n\nPlease enter you job title :  ";
                  cin.getline(myTitle[index], 20);

                  cout << "\n\nPlease enter your main duties :  ";
                  cin.getline(myDuties[index], 20);

                  cout << "\n\nPlease enter your brief summary of your experience there :\n";
                  cin.getline(mySummary[index], 20);

                  cout << "\n\nWould you like to add another company? (y/n) :  ";
                  cin >> re20;

                  system("cls");
                  if (re20 == 'y'){
                     index++;
                     cout << "\n\nPlease enter the company name :  ";
                     cin.getline(myCompany[index], 20);

                     cout << "\n\nPlease enter the date of hire :  ";
                     cin.getline(myEmpDate[index], 20);

                     cout << "\n\nPlease enter the city and state of the company :  ";
                     cin.getline(myCityState[index], 20);

                     cout << "\n\nPlease enter you job title :  ";
                     cin.getline(myTitle[index], 20);

                     cout << "\n\nPlease enter your main duties :  ";
                     cin.getline(myDuties[index], 20);

                     cout << "\n\nPlease enter your brief summary of your experience there :\n";
                     cin.getline(mySummary[index], 20);

                     cout << "\n\nWould you like to add another company? (y/n) :  ";
                     cin >> re21;

                     system("cls");
                     if (re21 == 'y'){
                        index++;
                        cout << "\n\nPlease enter the company name :  ";
                        cin.getline(myCompany[index], 20);

                        cout << "\n\nPlease enter the date of hire :  ";
                        cin.getline(myEmpDate[index], 20);

                        cout << "\n\nPlease enter the city and state of the company :  ";
                        cin.getline(myCityState[index], 20);

                        cout << "\n\nPlease enter you job title :  ";
                        cin.getline(myTitle[index], 20);

                        cout << "\n\nPlease enter your main duties :  ";
                        cin.getline(myDuties[index], 20);

                        cout << "\n\nPlease enter your brief summary of your experience there :\n";
                        cin.getline(mySummary[index], 20);
                     }
                  }
               }
            }
         }
      }

      system("cls");
      //now for the skills section.
      cout << "\n\nThe last optional section is the skills portion of the resume.";
      cout << "\n\nWould you like to enter your skills gained? (y/n) :  ";
      cin >> re22;
      system("cls");

      if (re22 == 'y'){
         cout << "\n\nThis section is broken down into separate sections including: \nNetworking, Programming, Hardware and any general skills you wish to add.";
         cout << "\n\nWould you like to include Networking skills? (y/n) :  ";
         cin >> re23;

         if (re23 == 'y'){
            cout << "Please enter your networking skills aquired :  ";
            cin.getline(myNetworking[index], 20);
         }

         system("cls");
         cout << "\n\nWould you like to include Programming skills aquired? (y/n) :  ";
         cin >> re24;

         if (re24 == 'y'){
            cout << "\n\nPlease enter your programming skills aquired :  ";
            cin.getline(myProgramming[index], 20);
         }

         system("cls");
         cout << "\n\nWould you like to include Hardware skills aquired? (y/n) :  ";
         cin >> re25;

         if (re25 == 'y'){
            cout << "\n\nPlease enter your hardware skills aquires :  ";
            cin.getline(myHardware[index], 20);
         }

         system("cls");
         index = 1;
         cout << "\n\nWould you like to include any general skills aquired? (y/n) :  ";
         cin >> re26;

         if (re26 == 'y'){
            cout << "\n\nIn this section, you can enter up to six general skills gained.";
            cout << "\n\nPlease enter the first skill :  ";
            cin.getline(myGeneral[index], 20);

            cout << "\n\nWould you like to enter another skill? (y/n) :  ";
            cin >> re27;

            if (re27 == 'y'){
               index++;
               cout << "\n\nPlease enter your second skill aquired :  ";
               cin.getline(myGeneral[index], 20);

               cout << "\n\nWould you like to enter another skill? (y/n) :  ";
               cin >> re28;

               if (re28 == 'y') {
                  index++;
                  cout << "\n\nPlease enter your third skill aquired :  ";
                  cin.getline(myGeneral[index], 20);

                  cout << "\n\nWould you like to enter another skill? (y/n) :  ";
                  cin >> re29;

                  if (re29 == 'y') {
                     index++;
                     cout << "\n\nPlease enter your forth skill aquired :  ";
                     cin.getline(myGeneral[index], 20);

                     cout << "\n\nWould you like to enter another skill? (y/n) :  ";
                     cin >> re30;

                     if (re30 == 'y') {
                        index++;
                        cout << "\n\nPlease enter your fifth skill aquired :  ";
                        cin.getline(myGeneral[index], 20);

                        cout << "\n\nWould you like to enter another skill? (y/n) :  ";
                        cin >> re31;

                        if (re31 == 'y') {
                           index++;
                           cout << "\n\nPlease enter your last skill aquired :  ";
                           cin.getline(myGeneral[index], 20);
                        }
                     }
                  }
               }
            }
         }
      }

      system("cls");

      cout << "\nEnter the Name of the File You Want to Create\n";
      cout << "Followed by the File Extension: ";
      cin >> FileName;

      ofstream Resume(FileName, ios::out);
      Resume << myName[index] << "\n" << myAddress[index] << "\n" << myPhone[index];

      system("PAUSE");
      return 0;
}
0
Comment
Question by:xardious
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 8

Expert Comment

by:novitiate
ID: 13669558
ofstream Resume(FileName.c_str(), ios::out);

_novi_
0
 
LVL 5

Accepted Solution

by:
beryl666 earned 2000 total points
ID: 13669857
#include <iostream>
#include <stdlib.h>
#include <string>
#include <fstream>

using namespace std;

int main()
{

      int index;
      //for the cover page or the intro info, cover page can be bypassed as with all sections addressed.
      char myName[1][20], myAddress[1][50], myCityZip[1][20], myPhone[2][13], myEmail[1][30]; //personal info.
      char bName[5][20], bAddress[5][30], bPhone[5][13]; //info of business addressed in resume.
      char POC[1][30]; //point of contact for default or both title and name of person being addressed in the business.
      char myStatement[1][50]; //for any opening remarks used to gain attention to the resume.
      char closing[1][50]; //closing statement.
      int test; //to test array close[] option.
      string FileName;

      //for the activities section.
      char myActivities[6][30];

      //for the education section.
      char mySchool[3][20];
      char myDegree[3][20];
      char myGdate[3][10];
      char myGPA[3][5];

      //for the experience portion of the resume.
      char myCompany[5][20];
      char myEmpDate[5][20];
      char myCityState[5][20];
      char myTitle[5][20];
      char myDuties[5][20];
      char mySummary[5][20];

      //for the skills section.
      char myNetworking[1][20];
      char myProgramming[1][20];
      char myHardware[1][20];
      char myGeneral[6][20];

      //for testing conditions to bypass or enter loops of the program.
      char re1, re2, re3, re4, re5, re6; //'re' for response in the first two sections of the resume builder.
      char re7, re8, re9, re10, re11, re12; //for the activities section.
      char re13, re14, re15; //for the education section.
      char re16, re17, re18, re19, re20, re21; //for the experience portion.
      char re22, re23, re24, re25, re26, re27, re28, re29, re30, re31; //for the skills portion.

      cout << "This program will guide you through a resume building process, please have your information handy. \n\nIf you would like to bypass any of the sections, you can do so when prompted. \n\n" << endl;
      cout << "This process will hold your information in an XML file to be read and \nedited later by another program, e.g. Note Pad, Word, Lotus 123, ect. " << endl;

      //prompt to start optional cover page.
      cout << "\nThe basic format for a resume starts with a cover page.\nIf you do not want to start a cover page, the program will ask for \nyour personal information and an opening statement." << endl;
      cout << "\nWould you like to create a cover page? (y/n) :  ";
      cin >> re1;
      system("cls");

      if (re1 == 'y'){
         cout << "\n\nPlease enter your name as you want it to appear at the beginning \nas well as the bottom of the cover page :  ";
         index = 1;
         cin.getline(myName[index], 20);

         system("cls");
         cout << "\n\nPlease note that there are two lines allowed for the addresses." << endl;
         cout << "\nPlease enter your street address :  ";
         cin.getline(myAddress[index], 50);

         system("cls");
         cout << "\n\nPlease enter the city, state and zip :  ";
         cin.getline(myCityZip[index], 20);

         system("cls");
         cout << "\n\nYou may also enter two contact numbers." << endl;
         cout << "\nPlease enter your primary home or cell phone number :  ";
         cin.getline(myPhone[index], 13);

         cout << "\n\nWould you like to include another phone number? (y/n) :  ";
         cin >> re2;
         system("cls");

         if (re2 == 'y'){
            index++;
            cout << "\n\nPlease enter your cell phone number :  ";
            cin.getline(myPhone[index], 13);
         }

         index = 1;
         cout << "\n\nWould you like to include your e-mail address as well? (y/n) :  ";
         cin >> re3;
         system("cls");

         if (re3 == 'y'){
            cout << "\n\nPlease enter your e-mail address :  ";
            cin.getline(myEmail[index], 30);
         }

         cout << "\n\nWould you like to enter the business information now? (y/n) :  ";
         cin >> re4;
         system("cls");

         if (re4 == 'y'){
            cout << "\n\nPlease enter the business name :  ";
            cin.getline(bName[index], 20);

            system("cls");
            cout << "\n\nPlease enter the business street address :  ";
            cin.getline(myAddress[index], 30);

            system("cls");
            cout << "\n\nPlease enter the city, state and zip :  ";
            cin.getline(bAddress[index], 30);

            system("cls");
            cout << "\n\nPlease enter the business phone number :  ";
            cin.getline(bPhone[index], 13);
         }

         cout << "\n\nFor the point of contact, if known, enter 'y', the default (n) will \nhold 'To Whom It May Concern;'.\n";
         cout << "\nPlease enter your response (y/n) :  ";
         cin >> re5;
         system("cls");

         if (re5 == 'y'){
            cout << "Please enter the title and name of the person to be addressed :  ";
            cin.getline(POC[index], 30);
         }

         cout << "\n\nWould you like to enter a short paragraph as the \nopening for the resume? (y/n) :  ";
         cin >> re6;
         system("cls");

         if (re6 == 'y'){
            cout << "\n\nPlease enter any remarks." << endl << endl;
            cin.getline(myStatement[index], 50);
         }

         cout << "\n\nWould you like to include a closing? (y/n) :  ";
         cin >> test;
         system("cls");

         if (test == 'y'){
            cout << "\nPlease enter your closing :  ";
            cin.getline(closing[index], 1);
         }
         //don't forget to print the myName string at the end as well for formality.
      }

      //if the user does not want to creat a cover letter, they can still enter their personal info and statement.
      else {
           index = 1;
           cout << "\n\nPlease enter your name :  ";
           cin.getline(myName[index], 20);

           system("cls");
           cout << "\n\nPlease note that there are two lines allowed for the address." << endl;
           cout << "\nPlease enter your street address :  ";
           cin.getline(myAddress[index], 50);

           system("cls");
           cout << "\n\nPlease enter the city, state and zip :  ";
           cin.getline(myCityZip[index], 20);

           system("cls");
           cout << "\n\nYou may also enter two contact numbers." << endl;
           cout << "\nPlease enter your primary home or cell phone number :  ";
           cin.getline(myPhone[index], 13);

           cout << "\n\nWould you like to include another phone number? (y/n) :  ";
           cin >> re2;
           system("cls");

           if (re2 == 'y'){
              index++;
              cout << "\n\nPlease enter your cell phone number :  ";
              cin.getline(myPhone[index], 13);
              system("cls");
           }

           index = 1;
           cout << "\n\nWould you like to include your e-mail address as well? (y/n) :  ";
           cin >> re3;
           system("cls");

           if (re3 == 'y'){
              cout << "\n\nPlease enter your e-mail address :  ";
              cin.getline(myEmail[index], 30);
           }

           cout << "\n\nWould you like to enter a short paragraph as the \nopening for the resume? (y/n) :  ";
           cin >> re6;
           system("cls");

           if (re6 == 'y'){
              cout << "\n\nPlease enter any remarks." << endl << endl;
              cin.getline(myStatement[index], 50);
           }
      }

      //now the activities step of the resume.
      cout << "\n\nWould you like to list the current activities you are involved in? (y/n) :  ";
      cin >> re7;
      system("cls");
      index = 1;

      if (re7 == 'y'){
          cout << "\n\nYou may list up to six activities.  Please enter your first activity :  ";
          cin.getline(myActivities[index], 30);
          cout << "\n\nWould you like to enter in another activity? (y/n) :  ";
          cin >> re8;
          system("cls");

          if (re8 =='y'){
             index++;
             cout << "\n\nPlease enter the next activity :  ";
             cin.getline(myActivities[index], 30);
             cout << "\n\nWould you like to enter another one in? (y/n) :  ";
             cin >> re9;
             system("cls");

             if (re9 =='y'){
                index++;
                cout << "\n\nPlease enter the next activity :  ";
                cin.getline(myActivities[index], 30);
                cout << "\n\nWould you like to enter another one in? (y/n) :  ";
                cin >> re10;
                system("cls");

                if (re10 =='y'){
                   index++;
                   cout << "\n\nPlease enter the next activity :  ";
                   cin.getline(myActivities[index], 30);
                   cout << "\n\nWould you like to enter another one in? (y/n) :  ";
                   cin >> re11;
                   system("cls");

                   if (re11 == 'y'){
                      index++;
                      cout << "\n\nPlease enter the next activity :  ";
                      cin.getline(myActivities[index], 30);
                      cout << "\n\nWould you like to enter another one in? (y/n) :  ";
                      cin >> re12;
                      system("cls");

                      if (re12 == 'y'){
                         index++;
                         cout << "\n\nPlease enter the next activity :  ";
                         cin.getline(myActivities[index], 30);
                      }
                   }
                }
             }
          }
      }

      index = 1;
      system("cls");
      //now the education section.
      cout << "\n\nWould you like to include your education? (y/n) :  ";
      cin >> re13;

      if (re13 == 'y'){
         cout << "\n\nIn this section, you can enter up to three schools.\nYou will be prompted for the name of the school, degree type, \nfinishing dates and GPA's.";
         cout << "\n\nPlease start with the last school you attended \nor are currently attending, then any previous schools." << endl;

         cout << "\nPlease enter the name of the school :  ";
         cin.getline(mySchool[index], 20);

         cout << "\n\nPlease enter the degree type gained :  ";
         cin.getline(myDegree[index], 20);

         cout << "\n\nPlease enter the graduation date or finishing date :  ";
         cin.getline(myGdate[index], 10);

         cout << "\n\nPlease enter the GPA :  ";
         cin.getline(myGPA[index], 5);

         cout << "\n\nWould you like to enter another school? (y/n) :  ";
         cin >> re14;
         system("cls");

         if (re14 =='y'){
            index++;
            cout << "\n\nPlease enter the name of the school :  ";
            cin.getline(mySchool[index], 20);

            cout << "\n\nPlease enter the degree type gained :  ";
            cin.getline(myDegree[index], 20);

            cout << "\n\nPlease enter the graduation date or finishing date :  ";
            cin.getline(myGdate[index], 10);

            cout << "\n\nPlease enter the GPA :  ";
            cin.getline(myGPA[index], 5);

            cout << "\n\nWould you like to enter another school? (y/n) :  ";
            cin >> re15;
            system("cls");

            if (re15 == 'y'){
               index++;
               cout << "\n\nPlease enter the name of the school :  ";
               cin.getline(mySchool[index], 20);

               cout << "\n\nPlease enter the degree type gained :  ";
               cin.getline(myDegree[index], 20);

               cout << "\n\nPlease enter the graduation date or finishing date :  ";
               cin.getline(myGdate[index], 10);

               cout << "\n\nPlease enter the GPA :  ";
               cin.getline(myGPA[index], 5);
            }
         }
      }

      system("cls");
      index = 1;
      //now the experience section.
      cout << "\n\nWould you like to enter information in the experience section? (y/n) :  ";
      cin >> re16;
      if (re16 == 'y'){
         cout << "\n\nYou are only allowed to enter six separate job positions.\nPlease enter the latest or current company first.";
         cout << "\n\nYou will be prompted for the name of the company, your beginning employee date,\nthe city and state worked from, ";
         cout << "the title of your position, your main duties \nand a brief summary of your experience." << endl;

         cout << "\nPlease enter the company name :  ";
         cin.getline(myCompany[index], 20);

         cout << "\n\nPlease enter the date of hire :  ";
         cin.getline(myEmpDate[index], 20);

         cout << "\n\nPlease enter the city and state of the company :  ";
         cin.getline(myCityState[index], 20);

         cout << "\n\nPlease enter you job title :  ";
         cin.getline(myTitle[index], 20);

         cout << "\n\nPlease enter your main duties :  ";
         cin.getline(myDuties[index], 20);

         cout << "\n\nPlease enter your brief summary of your experience there :\n";
         cin.getline(mySummary[index], 20);

         cout << "\n\nWould you like to add another company? (y/n) :  ";
         cin >> re17;

         system("cls");
         if (re17 == 'y'){
            index++;
            cout << "\n\nPlease enter the company name :  ";
            cin.getline(myCompany[index], 20);

            cout << "\n\nPlease enter the date of hire :  ";
            cin.getline(myEmpDate[index], 20);

            cout << "\n\nPlease enter the city and state of the company :  ";
            cin.getline(myCityState[index], 20);

            cout << "\n\nPlease enter you job title :  ";
            cin.getline(myTitle[index], 20);

            cout << "\n\nPlease enter your main duties :  ";
            cin.getline(myDuties[index], 20);

            cout << "\n\nPlease enter your brief summary of your experience there :\n";
            cin.getline(mySummary[index], 20);

            cout << "\n\nWould you like to add another company? (y/n) :  ";
            cin >> re18;

            system("cls");
            if (re18 == 'y'){
               index++;
               cout << "\n\nPlease enter the company name :  ";
               cin.getline(myCompany[index], 20);

               cout << "\n\nPlease enter the date of hire :  ";
               cin.getline(myEmpDate[index], 20);

               cout << "\n\nPlease enter the city and state of the company :  ";
               cin.getline(myCityState[index], 20);

               cout << "\n\nPlease enter you job title :  ";
               cin.getline(myTitle[index], 20);

               cout << "\n\nPlease enter your main duties :  ";
               cin.getline(myDuties[index], 20);

               cout << "\n\nPlease enter your brief summary of your experience there :\n";
               cin.getline(mySummary[index], 20);

               cout << "\n\nWould you like to add another company? (y/n) :  ";
               cin >> re19;

               system("cls");
               if (re19 == 'y'){
                  index++;
                  cout << "\n\nPlease enter the company name :  ";
                  cin.getline(myCompany[index], 20);

                  cout << "\n\nPlease enter the date of hire :  ";
                  cin.getline(myEmpDate[index], 20);

                  cout << "\n\nPlease enter the city and state of the company :  ";
                  cin.getline(myCityState[index], 20);

                  cout << "\n\nPlease enter you job title :  ";
                  cin.getline(myTitle[index], 20);

                  cout << "\n\nPlease enter your main duties :  ";
                  cin.getline(myDuties[index], 20);

                  cout << "\n\nPlease enter your brief summary of your experience there :\n";
                  cin.getline(mySummary[index], 20);

                  cout << "\n\nWould you like to add another company? (y/n) :  ";
                  cin >> re20;

                  system("cls");
                  if (re20 == 'y'){
                     index++;
                     cout << "\n\nPlease enter the company name :  ";
                     cin.getline(myCompany[index], 20);

                     cout << "\n\nPlease enter the date of hire :  ";
                     cin.getline(myEmpDate[index], 20);

                     cout << "\n\nPlease enter the city and state of the company :  ";
                     cin.getline(myCityState[index], 20);

                     cout << "\n\nPlease enter you job title :  ";
                     cin.getline(myTitle[index], 20);

                     cout << "\n\nPlease enter your main duties :  ";
                     cin.getline(myDuties[index], 20);

                     cout << "\n\nPlease enter your brief summary of your experience there :\n";
                     cin.getline(mySummary[index], 20);

                     cout << "\n\nWould you like to add another company? (y/n) :  ";
                     cin >> re21;

                     system("cls");
                     if (re21 == 'y'){
                        index++;
                        cout << "\n\nPlease enter the company name :  ";
                        cin.getline(myCompany[index], 20);

                        cout << "\n\nPlease enter the date of hire :  ";
                        cin.getline(myEmpDate[index], 20);

                        cout << "\n\nPlease enter the city and state of the company :  ";
                        cin.getline(myCityState[index], 20);

                        cout << "\n\nPlease enter you job title :  ";
                        cin.getline(myTitle[index], 20);

                        cout << "\n\nPlease enter your main duties :  ";
                        cin.getline(myDuties[index], 20);

                        cout << "\n\nPlease enter your brief summary of your experience there :\n";
                        cin.getline(mySummary[index], 20);
                     }
                  }
               }
            }
         }
      }

      system("cls");
      //now for the skills section.
      cout << "\n\nThe last optional section is the skills portion of the resume.";
      cout << "\n\nWould you like to enter your skills gained? (y/n) :  ";
      cin >> re22;
      system("cls");

      if (re22 == 'y'){
         cout << "\n\nThis section is broken down into separate sections including: \nNetworking, Programming, Hardware and any general skills you wish to add.";
         cout << "\n\nWould you like to include Networking skills? (y/n) :  ";
         cin >> re23;

         if (re23 == 'y'){
            cout << "Please enter your networking skills aquired :  ";
            cin.getline(myNetworking[index], 20);
         }

         system("cls");
         cout << "\n\nWould you like to include Programming skills aquired? (y/n) :  ";
         cin >> re24;

         if (re24 == 'y'){
            cout << "\n\nPlease enter your programming skills aquired :  ";
            cin.getline(myProgramming[index], 20);
         }

         system("cls");
         cout << "\n\nWould you like to include Hardware skills aquired? (y/n) :  ";
         cin >> re25;

         if (re25 == 'y'){
            cout << "\n\nPlease enter your hardware skills aquires :  ";
            cin.getline(myHardware[index], 20);
         }

         system("cls");
         index = 1;
         cout << "\n\nWould you like to include any general skills aquired? (y/n) :  ";
         cin >> re26;

         if (re26 == 'y'){
            cout << "\n\nIn this section, you can enter up to six general skills gained.";
            cout << "\n\nPlease enter the first skill :  ";
            cin.getline(myGeneral[index], 20);

            cout << "\n\nWould you like to enter another skill? (y/n) :  ";
            cin >> re27;

            if (re27 == 'y'){
               index++;
               cout << "\n\nPlease enter your second skill aquired :  ";
               cin.getline(myGeneral[index], 20);

               cout << "\n\nWould you like to enter another skill? (y/n) :  ";
               cin >> re28;

               if (re28 == 'y') {
                  index++;
                  cout << "\n\nPlease enter your third skill aquired :  ";
                  cin.getline(myGeneral[index], 20);

                  cout << "\n\nWould you like to enter another skill? (y/n) :  ";
                  cin >> re29;

                  if (re29 == 'y') {
                     index++;
                     cout << "\n\nPlease enter your forth skill aquired :  ";
                     cin.getline(myGeneral[index], 20);

                     cout << "\n\nWould you like to enter another skill? (y/n) :  ";
                     cin >> re30;

                     if (re30 == 'y') {
                        index++;
                        cout << "\n\nPlease enter your fifth skill aquired :  ";
                        cin.getline(myGeneral[index], 20);

                        cout << "\n\nWould you like to enter another skill? (y/n) :  ";
                        cin >> re31;

                        if (re31 == 'y') {
                           index++;
                           cout << "\n\nPlease enter your last skill aquired :  ";
                           cin.getline(myGeneral[index], 20);
                        }
                     }
                  }
               }
            }
         }
      }

      system("cls");

      cout << "\nEnter the Name of the File You Want to Create\n";
      cout << "Followed by the File Extension: ";
      cin >> FileName;

      //ofstream Resume(FileName, ios::out);
      ofstream Resume(FileName.c_str(), ios::out);

      Resume << myName[index] << "\n" << myAddress[index] << "\n" << myPhone[index];

      system("PAUSE");
      return 0;
}
//i wonder what compiler are you using? your code is not using c++ standard.
//Novi's answer is correct already just want to elaborate here
FileName is a string type
ofstream Resume(char[],ios::out);// the first paremeter need a character array or it call constant string.
so you need to concert it into constant string using
FileName.c_str()
0
 
LVL 30

Expert Comment

by:Axter
ID: 13670581
Hi xardious,
>> #include <iostream.h>

iostream.h is not part of the C++ standard, and therefore not portable.

Use <iostream> instead, and consider adding the using namespace std.

David Maisonave :-)
Cheers!
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Errors will happen. It is a fact of life for the programmer. How and when errors are detected have a great impact on quality and cost of a product. It is better to detect errors at compile time, when possible and practical. Errors that make their wa…
C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
The goal of the video will be to teach the user the concept of local variables and scope. An example of a locally defined variable will be given as well as an explanation of what scope is in C++. The local variable and concept of scope will be relat…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.
Suggested Courses
Course of the Month14 days, 21 hours left to enroll

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question