1 Attachment(s)
[error]"end" was not declared in this scope
I was learning programming from a book, in it there was a program which I have typed out and am recieving an error
[Error] 'end' was not declared in this scope
This is the program please tell me what is wrong
#include<iostream>
int main()
{
int x = 5;
int y = 7;
std::cout << endl;
std::cout << x + y <<""<< x * y;
std::cout <<end;
return 0;
}
Attachment 11811
Re: [error]"end" was not declared in this scope
Your "end" is an "endl" with the "l" missing.
Cheers,
_
Re: [error]"end" was not declared in this scope
Hello,
don't forget the namespace std. Change lines 6 and 8 to
Code:
std::cout << std::endl;
Note: add the missing 'l' to end in line 8 (as anda_skoa already pointed out).
Best regards
ars