The <iostream> instead of <iostream.h> is a new standard. Since I first started learning C++ at my university about a year and a half ago, that's what they've been teaching, but I think Microsoft Visual Studio still supports both. (I don't know if it would just be a matter of having all the old .h files present in the include directory where your compiler looks for them?)
As I understand it, the "new standard" was created in an effort to reduce "feature duplication" between the standard .h files... for instance, iostream.h and fstream.h provided some of the same functionality. (I don't know if this is the real reason, but one of my professors said something about this.)
You have to use the namespace for your program to know where to look for stuff, same goes for when you include anything like <string>, <fstream>, <iomanip>, <cmath>, and so on and try to use them, or you'll get an error...
Even if I don't really know why this is, I can write code that works.
cout "\n";
Shouldn't it be...
cout << "\n";
Right?
That first program you wrote up in your post should be fine if you added using namespace std; after the include statement.
I don't know if accessing a file is any different than it was before, I never tried with the "old standard," but these days you can do something like...
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ifstream file;
file.open("filename.ext");
if(!file) { cout << "File open error.\n\n"; exit(1); }
// ...
}
Then you can read stuff out of the file with file >>, like getting stuff from cin.
You can use an fstream object instead and declare what you want to be able to do with the file when you open it (open it in binary mode for instance).
Anyway you can probably figure this all out... Anyway, if you can get into OOP, it's great, I've done things that I couldn't imagine doing with a more procedural language. But it took a year and a half of C++ in college to get there, and now I think I can consider myself a little bit of a competent programmer.