L
Lee
Ok, just starting out teaching myself C++. I purchased Sams Teach
Yourself C++. Years ago, I purchased a similar book for C. So with
that having been said. I am running Ubuntu Linux, Anjuta IDE, which
uses G++ compiler. (Just giving you my system to help you help me.)
I've typed in the following example:
#include <iostream>
int main()
{
int x = 5;
int y = 7;
std::cout << endl;
std::cout << x + y << " " x * y;
std::cout << end;
return 0;
}
And get the following errors when it compiles it.
error: endl was not declared in this scope
error: expected `;' before 'x'
error: end was not declared in this scope
So... Seeing as this is the second piece of code they have me type in,
and already I am getting errors. I was hoping for a little help. When
Anjuta compiles the file it does so as such:
g++ -c "example.cc" -o "example.o"
Thank you folks in advance for your help. No this is not a college or
high school class. I am 42 and looking to learn C++ for the heck of
it. Thanks again.
Yourself C++. Years ago, I purchased a similar book for C. So with
that having been said. I am running Ubuntu Linux, Anjuta IDE, which
uses G++ compiler. (Just giving you my system to help you help me.)
I've typed in the following example:
#include <iostream>
int main()
{
int x = 5;
int y = 7;
std::cout << endl;
std::cout << x + y << " " x * y;
std::cout << end;
return 0;
}
And get the following errors when it compiles it.
error: endl was not declared in this scope
error: expected `;' before 'x'
error: end was not declared in this scope
So... Seeing as this is the second piece of code they have me type in,
and already I am getting errors. I was hoping for a little help. When
Anjuta compiles the file it does so as such:
g++ -c "example.cc" -o "example.o"
Thank you folks in advance for your help. No this is not a college or
high school class. I am 42 and looking to learn C++ for the heck of
it. Thanks again.