-
Question about Classes
Hello all,
I have read all tutorials on this site up to classes. I am now onto classes but the make no sense at all. I would like to ask a couple questions. First what is the actual need of classes? Second would anyone recommend some tutorials on classes other then on this site. The tutorial on this site seems a bit...vague if you please. Any help i get is truly appriciated.
Thank you in advance
-
Hi again,
Well i have read some tutorials and they are quite confusing. I am not understanding how to declare a function in a class. I sort of understand classes in general. I get the point of them, I just need a good tutorial on them or two. I have googled this subject and came up with this site and a couple other sites. These have helped but are really in general. If you could recomend an e-book I suppose I could download the e-book. What ever you suggest and any help anyone gives me I will truly appriciate it.
Thank you in advance
-
check this out its a little out of date but it works for classes just make sure you change
#include <iostream.h> to #include <iostream> and your as good as gold
http://newdata.box.sk/bx/c/index.htm
-
why would you replace <iostream.h> with <iostream> for classes?
-
i was saying that iostream.h is outdated
-
If you wouldnt mind explaining that with me I havent been programming for a year or so and had no clue about that being out of date if you could direct me to maybe an article on that topic
-
When C++ was standardized (in 1997?), there were some changes in how the standard library was going to be implemented, so they changed the naming convention of the header files. Tradionally, the iostream stuff was in <iostream.h>, but in the new standard, it was put into <iostream> and wrapped in the namespace std. Many older compilers still allow you to use the old header files, and many tutorials still refer to them as well. In general, you should make it a habit to use the new, standard headers if your compiler supports them, which is why prog-bman recommended that you use the new headers when taking code from old tutorials.
More information on the headers is here: http://www.cplusplus.com/doc/ansi/hfiles.html and you can look in the FAQ or search the web to learn more about the std namespace.
-
>> When C++ was standardized (in 1997?)
<uselessknowledge>
1998
</uselessknowledge>
-
Computer problems
Hey guys yesterday night we had a bad storm and my athlon 1800's board got friend with everything in it but memery and 1 cd rom nd maybe the proccessor. Well anyway now im back on an old Ibm Aptiva 300 and the computer cant compile anything. I may get a new mother board and fixup this computer untill then i wont be programming