Put this at the beginning of your program:Quote:
Originally Posted by xxghostsxx
Including iostream allows you to use cin and cout (input and output). The 'using namespace std' part is the block of code named std that cin and cout are located, but dont worry about that yet.Code:#include <iostream>
using namspace std;
Then at the point you want it to pause (usually at the end of the program) put:
This leaves you with:Code:cin.ignore();
cin.get();
Place those two together wherever you want to pause, I would forget about SYSTEM pause, but if you prefer to use it while learning its cool.Code:#include <iostream>
using namspace std;
struct database
{
int id_number;
int age;
float salary;
};
int main()
{
database employee; /* There is now an object of the 'database' that allows you to edit the
variables inside of it, named employee. Object meaning a copy of it. */
employee.age=22;
employee.id_number=1;
employee.salary=12000.21;
cin.ignore();
cin.get();
return 0;
}