I'm learning C++ with codeblocks and I'd like to ask if you can post me some good pointers how I can learn the difference between MinGW and Visual studio C++, for example \n
and <<
don't always behave as I'm expecting. I'm complete newbie, only reached day 2 of an old book "Teach yourself C++ in 21 days" by Jesse Liberty and the program looks like this:
#include <iostream>
using namespace std;
int main()
{
cout << "Hello there."; endln;
cout << "Here is 5: " << 5 << endl;
cout << "The manipulator endln writes a new line to the screen";
cout << "Here is a very big number:\t" << 70000;
cout << "Here is the sum of 8 and 5:\t" << 8+5;
cout << "Here is a fraction:\t\t" << (float) 5/8;
cout << "And here is a very big number:\t" << (double) 7000*7000;
cout << "Remember to replace Niklas with you name";
cout << "Hampus is a C++ programmer!";
return 0;
}
Is MinGW C++ the same as GNU C++? Is there an official standard? any advice for newbie learning / teaching will be appriciated. The book I'm following is "Teach yourself C++ in 21 days" and it is and old edition of the book but I could modify the programs from the first exercise to run and I believe I can use the book since perhaps not many changes were made to the basic C++ since it was published (the edition of the book I own is maybe 10 years old).
Thank you!
Update After getting the recommendations here, I've bought the book C++ Primer.