#include <cstdlib>
#include <iostream>
#include "stdafx.h"
using namespace std;
int main()
{
char YorN;
cout << "This Program Calculates Job Earnings\n\n";
cout << "Would You Like To Use The Pay Calculator Program: ";
//With while loop the 2 previous cout statements are not
//read
cin >> YorN;
while ( YorN == 'Y' || YorN == 'y' )
{
//while ( YorN <> 'N' || YorN <> 'n' )
cout << "Would You Like To Enter The Program Again";
cin >> YorN;
}
system("PAUSE");
return 0;
}
i ran this program before and i didn't have any problems no when i run this program i keep getting these errors.
Warning 1 warning C4627: '#include <cstdlib>': skipped when looking for precompiled header use d:\windows\my documents\visual studio 2008\projects\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no.cpp 1 YorNLoop.with.while.and.y.equal.loop.no
Warning 2 warning C4627: '#include <iostream>': skipped when looking for precompiled header use d:\windows\my documents\visual studio 2008\projects\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no.cpp 2 YorNLoop.with.while.and.y.equal.loop.no
Error 3 error C2871: 'std' : a namespace with this name does not exist d:\windows\my documents\visual studio 2008\projects\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no.cpp 5 YorNLoop.with.while.and.y.equal.loop.no
Error 4 error C2065: 'cout' : undeclared identifier d:\windows\my documents\visual studio 2008\projects\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no\yornloop.with.while.and.y.equal.loop.no.cpp 11 YorNLoop.with.while.and.y.equal.loop.no