-
Borland 4.5 -> 5.5
At uni we have been using Borland 4.5 and at home I have .net and Borland 4.5. and now 5.5. Because Borland 4.5 doesnt work with <iostream> and requires <iostream.h>, we have never been shown how to implement our code using the new standards.
Can anyone tell me a good site or even tell me if it is very different to the old way. I see alot of using namespaces etc, but dont understand how all that is.
NB: I have been going through FAQ
-
if you just use the standard namespace the whole way through, alot of it is the same... what's not the same you'll pick up as you do it... just do this at the top:
Code:
#include<iostream>
using namespace std;
then you can go on using cin and cout and all that good stuff just like you used to... but you should eventually learn what comes from where, like for example:
Code:
#include<iostream>
using std::cin;
using std::cout;
using std::endl;
using std::ios;
using std::flush;
#include<fstream>
usning std::ifstream;
using std::ofstream;
and later on, if it doesn't comlicate things too much, just tell the compiler what namespace to use when you need it:
Code:
#include<iostream>
int main()
{
std::cout<<"Hello World"<<std::endl;
std::cin.get();
return 0;
}
here's a few of the things in the standard namespace: http://www.cppreference.com/cppio_flags.html