So thats one difference between the two, just different headers, but the same effects Microsoft Visual C++ 6.0, is what I'm using, and both work on mine, so when using <iostream> you have to include:
using namespace std; std::cin; or std::cout;
Right I just want to make sure I'm understanding all this correctly.
I'm new to C++ as well and I see a big problem off hand. I see no .h in your library<iostream>. You can fix this several ways. If you want to use std::cout you need to do this:
#include <iostream> using namespace std;
Or this:
#include <iostream.h> (if done this way do not use "std::cout", only "cout")
Now I'm not really sure as to the difference between the two, (only been in C++ for 10 weeks now), but either way should work.
Both header files (the old iostream.h and the new iostream) where part of Visual C++ 6.0. Since then, Visual C++ 6.0 came out in 1998, we have completely removed the old file iostream.h.
The old file, iostream.h, is not conformant to the C++ Standard, while iostream is.
hi i cant debug my code ?
Gary-unisys
So thats one difference between the two, just different headers, but the same effects Microsoft Visual C++ 6.0, is what I'm using, and both work on mine, so when using <iostream> you have to include:
using namespace std;
std::cin; or std::cout;
Right I just want to make sure I'm understanding all this correctly.
arnaud404
I'm new to C++ as well and I see a big problem off hand. I see no .h in your library<iostream>. You can fix this several ways.
If you want to use std::cout you need to do this:
#include <iostream>
using namespace std;
Or this:
#include <iostream.h> (if done this way do not use "std::cout", only "cout")
Now I'm not really sure as to the difference between the two, (only been in C++ for 10 weeks now), but either way should work.
Christopher B. Green
Razmattaz1
The old file, iostream.h, is not conformant to the C++ Standard, while iostream is.
clemon79
To Wooten: iostream is a valid header. I don't think iostream.h exists under VS 2005.
Kian Ryan
Set a breakpoint at the line with std::cout (F9).
Press go (F5).
What happens