Question about Classes

This is a discussion on Question about Classes within the C++ Programming forums, part of the General Programming Boards category; Hello all, I have read all tutorials on this site up to classes. I am now onto classes but the ...

  1. #1
    Registered User
    Join Date
    Jun 2004
    Posts
    11

    Smile 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

  2. #2
    Registered User
    Join Date
    Jun 2004
    Posts
    11
    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

  3. #3
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,801
    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
    Woop?

  4. #4
    Stinking it up. StinkyRyan's Avatar
    Join Date
    Jun 2004
    Posts
    61
    why would you replace <iostream.h> with <iostream> for classes?

  5. #5
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,801
    i was saying that iostream.h is outdated
    Woop?

  6. #6
    Stinking it up. StinkyRyan's Avatar
    Join Date
    Jun 2004
    Posts
    61
    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

  7. #7
    Registered User jlou's Avatar
    Join Date
    Jul 2003
    Posts
    1,088
    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.

  8. #8
    Toaster Zach L.'s Avatar
    Join Date
    Aug 2001
    Posts
    2,686
    >> When C++ was standardized (in 1997?)

    <uselessknowledge>
    1998
    </uselessknowledge>

  9. #9
    Registered User
    Join Date
    Jun 2004
    Posts
    11

    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

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Classes question...
    By Raigne in forum C++ Programming
    Replies: 24
    Last Post: 09-12-2006, 01:46 AM
  2. Replies: 2
    Last Post: 07-28-2006, 02:59 PM
  3. Simple Question about Classes
    By Loctan in forum C++ Programming
    Replies: 5
    Last Post: 06-26-2006, 02:40 AM
  4. Classes and Win32 API, and another Question
    By philvaira in forum Windows Programming
    Replies: 10
    Last Post: 04-10-2004, 07:21 PM
  5. Newbie question about the Private type in classes
    By Ryeguy457 in forum C++ Programming
    Replies: 1
    Last Post: 09-07-2002, 10:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21