Sunday, 6 May 2012

Program Of Opening a File In C++

#include<iostream.h>
#include<conio.h>
main()

{

    clrscr();

    char FirstName[30], LastName[30];

    int Age;

    char FileName[20];

    cout << "Enter First Name: ";

    cin >> FirstName;

    cout << "Enter Last Name:  ";

    cin >> LastName;

    cout << "Enter Age ";

    cin >> Age;

    cout << "\nEnter the name of the file you want to create: ";

    cin >> FileName;


     Students << FirstName << "\n" << LastName << "\n" << Age;
  
    getch();

}

No comments:

Post a Comment