| | |
Correcting Mistakes...using Standard C++
Please support our C++ advertiser: Intel Parallel Studio Home
Thread Solved |
•
•
Join Date: Feb 2009
Posts: 35
Reputation:
Solved Threads: 0
Well, I posted a few problems here on daniweb and thank god that I did so. What I had been using till now was "rusted, naff,useless" code. But after today, I am more accustomed to what the new c++ is.
Well, I am 16 years old and am studying in standard 10+2.
The problem is the way we are taught in school. In school, we still use
#include<iostream.h>,#include<conio.h>,getch(),clrscsr()...etc.etc....
Considering the fact that I have already had 1.5 years of study in c++(using the old ways), you may guess my current condition.
I referred to Siddhants guide and found it quite useful. Thanks.
Well, coming to the point on what I want...
If anyone could help me and provide me with link to the better tutorials on Standard and modern C++, I would be highly grateful.
Well, I don't know how to use vectors. So,a guide on vectors would be useful.
Also, a list of modern header files would be extremely useful. From my information, conio.h is not in use anymore. So, how can I use stuff like cout, cin, etc.
What are namespaces?
And a list of things and functions which are outdated now, and the new ones to replace them would be great.
Thanks a ton in advance. Any help would be greatly appreciated.
Well, I am 16 years old and am studying in standard 10+2.
The problem is the way we are taught in school. In school, we still use
#include<iostream.h>,#include<conio.h>,getch(),clrscsr()...etc.etc....
Considering the fact that I have already had 1.5 years of study in c++(using the old ways), you may guess my current condition.
I referred to Siddhants guide and found it quite useful. Thanks.

Well, coming to the point on what I want...
If anyone could help me and provide me with link to the better tutorials on Standard and modern C++, I would be highly grateful.
Well, I don't know how to use vectors. So,a guide on vectors would be useful.
Also, a list of modern header files would be extremely useful. From my information, conio.h is not in use anymore. So, how can I use stuff like cout, cin, etc.
What are namespaces?
And a list of things and functions which are outdated now, and the new ones to replace them would be great.
Thanks a ton in advance. Any help would be greatly appreciated.
http://www.mindview.net/Books/TICPP/...ngInCPP2e.html
Direct link to Volume 1
Direct link to Volume 2
These books should be perfect for you. Volume 1 may cover some topics you already know, but it also covers namespaces, templates, and polymorphism. Volume 2 teaches you the Standard C++ Library and the Standard Template Library.
Reference to the C++ Standard headers - http://www.cplusplus.com/reference/
Direct link to Volume 1
Direct link to Volume 2
These books should be perfect for you. Volume 1 may cover some topics you already know, but it also covers namespaces, templates, and polymorphism. Volume 2 teaches you the Standard C++ Library and the Standard Template Library.
Reference to the C++ Standard headers - http://www.cplusplus.com/reference/
Last edited by Grigor; Jun 23rd, 2009 at 10:59 am.
•
•
Join Date: Feb 2008
Posts: 630
Reputation:
Solved Threads: 46
C++ Syntax (Toggle Plain Text)
#include <iostream>
namespaces are ways to group functions - for example, the cout, etc you are looking for are in the std namespace, so you have to call them like this:
C++ Syntax (Toggle Plain Text)
#include <iostream> int main() { std::cout << "something" << std::endl; return 0; }
Other useful things in the std namespace:
C++ Syntax (Toggle Plain Text)
#include <vector> #include <string> etc.
good luck
dave
This ebook is the most suitable for you I think, superb explanations, cool code examples, answers to most of your C++ questions...
"Never argue with idiots, they just drag you down to their level and then beat you with experience."
•
•
•
•
What I had been using till now was "rusted, naff,useless" code.
It's easy for some armchair critic to complain, but you're the one who has to get the job done by any means necessary.•
•
•
•
If anyone could help me and provide me with link to the better tutorials on Standard and modern C++, I would be highly grateful.
•
•
•
•
From my information, conio.h is not in use anymore.

I say you should learn how to use everything, portable or not, standard or not, and then choose the best of them for what you need to do. Being standard and portable is a great goal, but to get anything substantial done you have to compromise somewhere.
•
•
•
•
What are namespaces?
The easiest thing is to change the name of DoStuff() in your library to something like MyDoStuff(). Now there's no conflict between the two functions. Namespaces do the same thing without changing the name of the function. They add another piece to the puzzle of choosing which name to use.
If you and your friend both use namespaces, there won't be any conflict to start with:
c++ Syntax (Toggle Plain Text)
namespace Friend { void DoStuff(); } namespace Me { void DoStuff(); }
Friend::DoStuff() . Yours is Me::DoStuff() . Both names are unique because the namespace part of the name is different.That's it! Namespaces are a way to avoid name conflicts.
-Tommy (For Great Justice!) Gunn
Well, I know that guide was not exhaustive. It was not a reference material, it was just a guide.
I clearly mentioned that you will have to search for more information about specific topic on the web.
Learn to use a search engine well. There is a sticky thread about C++ books.
My personal favorite are Accelerated C++ ( non-free ) and Thinking in C++ ( a free book by Bruce Eckels)
Though I myself prefer books, you may want to start with a tutorial. But do what ever, stay away from short guides like Sams " Teach yourself C++ in X days" <-- stay away from such guides.
Also read How to Ask Question the Smart Way the link is here.
I clearly mentioned that you will have to search for more information about specific topic on the web.
Learn to use a search engine well. There is a sticky thread about C++ books.
My personal favorite are Accelerated C++ ( non-free ) and Thinking in C++ ( a free book by Bruce Eckels)
Though I myself prefer books, you may want to start with a tutorial. But do what ever, stay away from short guides like Sams " Teach yourself C++ in X days" <-- stay away from such guides.
Also read How to Ask Question the Smart Way the link is here.
Last edited by siddhant3s; Jun 23rd, 2009 at 11:08 am.
Siddhant Sanyam
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
Someone linked these YouTube video tutorials, I think you should check them out.
http://www.youtube.com/watch?v=Jud497WjF-E&feature=fvst
http://www.youtube.com/watch?v=Jud497WjF-E&feature=fvst
•
•
•
•
The problem is the way we are taught in school. In school, we still use
#include<iostream.h>,#include<conio.h>,getch(),clrscsr()...etc.etc....
anyone can quickly learn to use any library function that one may given in the course of their work. But you will only be hurting yourself if you learn to rely on those non-portable functions, and then one day find all your code is broken when you try to port it to another environment.
also, when you come to ask questions on a standard-C forum like this one or any of the other major forums, you will lose the assistance of people who do not, can not, or will not use non-portable libraries such as conio.
ultimately it's your choice. personally, my choice is that i just don't even bother trying to compile anyone's code who uses non-standard libraries. I simply don't care to include those libraries on my work or home machines, and therefore i don't spend any time trying to debug examples those people might post.
> This ebook is the most suitable for you I think, superb explanations, cool code examples, answers to most of your C++ questions...
And patently wrong statement even in the first paragraph!
"Simply stated, to be a professional programmer implies competency in C++."
So all the C, Perl, Java, Python, Fortran, COBOL programmers in the world are amateur hacks?
Rubbish!
I wonder how "chummy" it gets with the Microsoft compiler, since it is hosted on their site?
And patently wrong statement even in the first paragraph!
"Simply stated, to be a professional programmer implies competency in C++."
So all the C, Perl, Java, Python, Fortran, COBOL programmers in the world are amateur hacks?
Rubbish!
I wonder how "chummy" it gets with the Microsoft compiler, since it is hosted on their site?
![]() |
Similar Threads
- java application that will print to patterns (Java)
- This is my 1st program, could someone help me with the swap routine??? (C)
- Newbie needs help building a server (IT Professionals' Lounge)
- Webe site Review Zooped.com (Website Reviews)
- Help needed in graphics.h (C++)
- my 1st Tutorial.... (IT Professionals' Lounge)
- Just started, need a little help... (Getting Started and Choosing a Distro)
- C preprocessor (C)
- C++ Help (C++)
- Need help with this conversion program (C++)
Other Threads in the C++ Forum
- Previous Thread: so my program gets the numbers correctly when there are quotes but not otherwise
- Next Thread: Is there a library with DOS system commands?
| Thread Tools | Search this Thread |
api array arrays based beginner binary bitmap c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer dll download dynamic dynamiccharacterarray email encryption error file forms fstream function functions game getline givemetehcodez graph gui homeworkhelp homeworkhelper iamthwee ifstream input int java lib list loop looping loops map math matrix memory multiple news node number numbertoword output parameter pointer problem program programming project proxy python random read recursion recursive reference rpg sorting string strings temperature template text text-file tree url variable vector video visual visualstudio win32 windows winsock word wordfrequency wxwidgets






