So in the down time before summer semester, I'm trying to learn a little C++ on my own. I'm working through a book, but not using the compiler provided. Instead, I'm using MinGW. The problem I've encountered is that the headers the two compilers need appear to be somewhat different. For example, where the text uses
#include <iostream.h>
...the MinGW C++ compiler needs...
#include <iostream>
... so now I have a simple program manipulating strings I'm trying to run, and the header provided in the text is...
#include <string6.h>
...and I don't know what header to include to make it run. In fact, I don't really know how headers work. I have a cursory knowledge of Java and Python and that's it. Do I need to install the compiler that came with the text after all? Where can I find a list of the headers used by the MinGW C++ compiler for different data? Here is the code I was trying to run...
int main() {
string s1;
string s2;
s1 = "This is a test";
s2 = "and so is this.";
cout << s1;
cout << s2;
return 0;
}
Any help and insight into the general way headers work would be much appreciated. I can't seem to make sense out of the MinGW documentation.