Wednesday, 21 August 2013

geany will not let me use the "endl;" when using c++

geany will not let me use the "endl;" when using c++

every time I try to compile it I get an error message along the lines of
"exercise3.cpp:10:49: error: expected ';' before 'endl'"
and if I add the ; before endl I get the error message
"exercise3.cpp:8:71: error: statement cannot resolve address of overloaded
function"
I have no idea what the problem is with this, so any help would be
appreciated.
code: (sorry about not being lined right but i assure you that it is.)
#include "iostream"
using namespace std;
int main()
{
cout << "hello there!\n";
cout << "here is 5: "<< 5 << "\n";
cout << "the manipulator end1 wrotes a new line to the screen."; endl;
cout << "here is a very bug number:\t" << 70000 endl;
cout << "here is the sum of 8 and 5:\t" << 8+5 endl;
cout << "heres a fraction:\t\t" << (float) 5/8 endl;
cout << "and a very big number:\t" << (double) 70000*70000 endl;
cout << "you really dont have to type this line XD\n";
cout << "or this one :P cause its not really needed!\n";
return 0;
}

No comments:

Post a Comment