Hey, I'm using SAMS teach yourself C++ in 21 days, and currently I am on Day 2, however, I've gotten a lot of errors whenever I compile even though I type out the examples exactly as they should be.
I'm using Borland C++ Compiler. command line tools or something like that.
Heres the example:
#include <iostream>
int main()
{
std::cout << "Hello there.\n";
std::cout << "Here is 5: " << 5 << "\n"
std::cout << "The manipulator std::endl";
std::cout << "writes a new line to the screen.";
std::cout << std::endl;
std::cout << "Here is a very big number:\t << 7000";
std::cout << std::endl;
std::cout << "Here is the sum of 8 and 5:\t";
std::cout << 8+5 << std::endl;
std::cout << "Here's a fraction: \t\t";
std::cout << (float) 5/8 << std::endl;
std::cout << "And a very very big number:\t";
std::cout << (double) 7000 * 7000 << std::endl;
std::cout << " Don't forget to replace Jesse Liberty ";
std::cout << "with your name...\n";
std::cout << "Jesse Liberty is a C++ programmer!\n";
return 0;
}
Heres the error:
Error E2379 program.cpp 6: Statement missing ; in function main()
***1 errors in compile***
Line 6 would be std::cout << "The manipulator std::endl";
I cannot for the love of me figure out what is wrong.
Also, can someone suggest a better compiler to use when learning C++ using SAMS?
Help would be really really appreciated.