Hi, I'm totally a newbie in C++ programing, I'm starting from de first lesson, creating the "Hello World" program, and had several errors. First, in the line "#include <iostream>" y had to change that for "#include <iostream.h>"
Then the second error was related to the line "using namespace std;"
Eventhough I clearly understand that refers to the use of a library, I can't make the program to be compiled. The only way was to delete that line in the program code. Why is that? I'm aware that line is essential for future instructions in more complex programs. Besides, I can't find such a library called "namespaces" in the "Lib" directory of TurboC, and the help menu lists only the word "use" but not "using".
Maybe I'm running the wrong version of TurboC.
Can you help me?
I'm guessing that Turbo C(++) conforms to a standard that pre-dates namespaces, which means you will need to include iostream.h as you are doing and omit the using namespace line.
u'd better change ur TurboC to VC++, and use C++ style header "#include <iostream>".
In VC++, you can only use "using namespace std;" by using C++ style header "#include <iostream>", if u use "using namespace std;" follow by "#include <iostream.h>", there will be a error.
Thanks a lot everybody. To Bluezor, my answer is yes, I used "using namespace std" after #include <iostream> but this version of C++ accepts "iostream.h" instead of just "iostream". Yes, the only way to get the program compiled was to delete the line "using namespaces std;" but I was worried that could cause a lack of resources or cause errors in more complex programs written this way. As you tell me, the thing is my version of C++ is quite old (I hope it's not obsolete). So I'll try to upgrade to VC++. I wanted to learn the "old fashioned" way, so that when I upgraded to newer versions of compilers, things would be easier to understand and I could have a more solid structure of knowledge, as I found when I learned DOS and upgraded years later to Windows. People who currently don't know DOS sometimes get stuck in actually easy-to-solve problems if they used DOS methods. I hope the same thing doesn't occur with VC++.
Thank you all again, now I see that nothing is wrong with my software, just out of date.