So every time I try to compile I get project out of date now i have turned off precompiled headers as another website said would work but of course it did not.
1 2 3 4 5 6 7 8 9 10 11
|
#include <iostream>
void main() {
char cContinue;
int amount
do {
std::cout "Amount of money you want to take?" << std::endl;
std::cin >> amount;
std::cout "taken " << amount << " Please come again!" << std::endl;
std::cout "Would you like to make another transaction (y/n)?" << std::endl;
} while (cContinue == 'y');
|
Also the bulid error log:
1>------ Build started: Project: While Loop, Configuration: Debug Win32 ------
1> While Loop.cpp
1>While Loop.cpp(6): error C2143: syntax error : missing ';' before 'do'
1>While Loop.cpp(7): error C2143: syntax error : missing ';' before 'string'
1>While Loop.cpp(7): error C2563: mismatch in formal parameter list
1>While Loop.cpp(7): error C2568: '<<' : unable to resolve function overload
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1021): could be 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=unsigned short,
1> _Traits=std::char_traits<unsigned short>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1011): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=wchar_t,
1> _Traits=std::char_traits<wchar_t>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1003): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(977): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1>While Loop.cpp(9): error C2143: syntax error : missing ';' before 'string'
1>While Loop.cpp(9): error C2296: '<<' : illegal, left operand has type 'const char [7]'
1>While Loop.cpp(9): error C2143: syntax error : missing ';' before 'string'
1>While Loop.cpp(9): error C2563: mismatch in formal parameter list
1>While Loop.cpp(9): error C2568: '<<' : unable to resolve function overload
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1021): could be 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=unsigned short,
1> _Traits=std::char_traits<unsigned short>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1011): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=wchar_t,
1> _Traits=std::char_traits<wchar_t>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1003): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(977): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1>While Loop.cpp(10): error C2143: syntax error : missing ';' before 'string'
1>While Loop.cpp(10): error C2563: mismatch in formal parameter list
1>While Loop.cpp(10): error C2568: '<<' : unable to resolve function overload
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1021): could be 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=unsigned short,
1> _Traits=std::char_traits<unsigned short>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1011): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=wchar_t,
1> _Traits=std::char_traits<wchar_t>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(1003): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1> with
1> [
1> _Elem=char,
1> _Traits=std::char_traits<char>
1> ]
1> C:\Program Files (x86)\Microsoft Visual Studio 10.0\VC\include\ostream(977): or 'std::basic_ostream<_Elem,_Traits> &std::endl(std::basic_ostream<_Elem,_Traits> &)'
1>While Loop.cpp(12): fatal error C1075: end of file found before the left brace '{' at 'While Loop.cpp(3)' was matched
========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========