C++ standards are not working for me..

Hello , as you might have guessed ,I'm a perfect newbie.C++ is on my high school syllabus and the IDE we are using is Turbo C++ 3.0 on windows xp platform.

They taught us to always begin programs like this as follows...

1
2
3
4
5
6
7
8
9
#include<iostream.h>
#include<conio.h>

void main()
{
//statements
getch();
}


But as I'm very much interested in programming , I brought a college level text book and also searched the web(including this site),they all tell to do the following things

*do not use .h on header files
*they have "using namespace std" on all programs
*they use several objects/functions such as, for example...

string s1("This is a string");

to create a string..

But the problem is , my IDE is showing tonns of errors for all of these things.It isn't even recognising "using namespace std" and does not find header files without .h.


I am sure that I'm making some big mistake.please advice me.I will be grateful :)



Thanks in advance
That's because the IDE is ancient. Download MS Visual C++ Express Edition. I would also be very concerned about the C++ course you are taking as it is apparent your instructor is not up to date with the language.
C++ is on my high school syllabus and the IDE we are using is Turbo C++ 3.0


This really sickens me that classes are teaching something this horribly out of date. What a waste of everyone's time and money.
Thank you very much for your instant reply sir.

Also ,Turbo c++ is IDE used for c++ in the entire state(high school syllabus).I will have to study the global standards on my own :).

Thank you again for your quick reply :) :) :) :)
Yes Disch you are right :) ...
If you're still there and don't mind answering I have to ask. What state is this?
lol , I expected this question , and I am proud to announce that I come from the Southern Most state of India ,namely Kerala .

how pathetic isn't it ?
I've noticed that many Indian universities use Turbo C++ and teach deprecated practices, syntax, and technologies in general instead of focusing on standards, proven as well as new technologies.
It's ok, this site will teach you how to shock your teacher into the modern era. I would like to ask you to avoid MS Visual C++ if you don't mind. Plenty of other compilers and IDE's are free and Microsoft products will prevent you from learning things like linking, and it will also make it almost impossible for you to distribute your final program (because of DLL dependencies).

I personally like wxDev-C++: http://wxdsgn.sourceforge.net/?q=node/4

Code::Blocks is another popular one on this form found here: http://www.codeblocks.org/downloads

Also the reason that you are told to avoid header files with a ".h" extension is they are generally the older\legacy versions of the header files. Newer header files omit the ".h" and have newer or updated entries. The reason that Turbo C++ 3.0 won't work when you omit the ".h" is that those files aren't in the "include" directory.

EDIT: If you have a brand loyalty to Microsoft then please consider suit their best compiler to date the Windows SDK: http://msdn.microsoft.com/en-us/windows/bb980924 . It isn't an IDE but this thing is fast and powerful and it comes with all of the libraries you need to write Windows Programs.
Last edited on
Watcom is free, fast and current.
http://www.openwatcom.org/index.php/Download
Microsoft products will prevent you from learning things like linking


How do you figure? It doesn't do anything that any other IDE doesn't already do in that respect.

and it will also make it almost impossible for you to distribute your final program (because of DLL dependencies).


Talk about an overstatement. I never had any problems. There's always the option to statically link the libs, anyway.

But it's kind of a moot point since nearly everyone on Windows has MS runtimes installed these days.



Although encouraging him to shop around is a good move. So maybe I shouldn't say anything? ;P
Topic archived. No new replies allowed.