Need help Learning classes (changed by Kermi3)

This is a discussion on Need help Learning classes (changed by Kermi3) within the C++ Programming forums, part of the General Programming Boards category; I am a rookie at these kinds of thing and i have no clue what a "class" is or how ...

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    14

    What is a class?

    I am a rookie at these kinds of thing and i have no clue what a "class" is or how it works. Can someone explain?
    Last edited by papisuave; 11-19-2002 at 08:56 PM.

  2. #2
    Lead Moderator kermi3's Avatar
    Join Date
    Aug 1998
    Posts
    2,595

    Homework

    Ok, first of all I want to note that I am extremely sympathetic to your family emergency, though the following may not show it. It's a form response, however it is still true and please don't disreguard it because it is true, I wrote it for this situation (generally), especially refering to the part I've bolded (my pet peeve, cheating).

    What don't you understand on this? Classes? Constructors? What's your code so far? What do you still have and what do you still not understand?

    I'm am posting this because it appears that you are posting a homework assignment or other project and you are asking for someone else to do all of the work.

    Please don't ask people to do all your work for you, See the announcement on Homework at the top of the forum to see what is acceptable ro PM. Basically people are happy to help, but they're not going to do it all for you.

    Show us what you've got, show your code (using code tags), or where you're confused and someone will be happy to help you I'm sure. If it's something that you absolutely don't understand how it works, like you have no clue how qsort works, then ask a general question about the function and I'm sure someone will explain it. Though they may not give you all of the code for it, but someone will explain the concept.


    On obivous homework questions especially, I like to remind people of the board's tenth guildeline, while this board is very helpful to people, make sure you have your instructor's permission before seeking help on assignments. While people on these boards are more than happy to help, we discourage people from asking for help on graded work without the instructor's permission, and we claim no repsonsibilty for any cheating or honor violations.

    Feel free to PM me with any questions.

    Good Luck,

    Kermi3
    Kermi3

    If you're new to the boards, welcome and reading this will help you get started.
    Information on code tags may be found here

    - Sandlot is the highest form of sport.

  3. #3
    Registered User
    Join Date
    Oct 2002
    Posts
    14

    Nice one stiffy

    I got a kick out of that one, but really...

    What is a class?

  4. #4
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    check out the tutorials...it would take a lot of space to tell you everything about a class, if you have questions about certain parts of the class like kermi3 mentioned, such as constructors, member functions, private/protected/public, people would be glad to help...

    edit:: here this link should help you out ... http://www.cprogramming.com/tutorial/lesson12.html

  5. #5
    Registered User
    Join Date
    Oct 2002
    Posts
    14

    hmmm

    I checked your link out, but I am still confused where to start. I am looking at my assignment, and she is talking about constructors, accessor fuctions and mutuator fuctions. Man, I miss the beginning of the semester, everything seemed a lot clearer. In the link, it was talking about deconstuctors. Can you explain them in laymans terms, I am still a beginner?

  6. #6
    Registered User
    Join Date
    Oct 2002
    Posts
    14

    float

    what is a float?

  7. #7
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    destructors basically delete stuff from memory, like it frees up the memory that persay a vector or a string may have used, due to the size that these may have taken...

    constructors always have the same name as the class.
    destructors are the same but have a ~ in front of the name.

    accessors are public member functions (i believe) sorry, im still learning classes too, i tend to mix up terminology. but this should be right.

    what a constructor does is create an instance of the type that you define in your class. it is similar to declaring an int.

    int x;

    int is the type, x is the variable.

    so if you have your class, you constructor will allow you to do the following line.

    classname variable;

    mutuator functions?

    a float is basically a double.

  8. #8
    Registered User
    Join Date
    Oct 2002
    Posts
    14

    ah

    I see. Thanks for the info alpha

  9. #9
    moi
    moi is offline
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946

    Re: float

    Originally posted by papisuave
    what is a float?
    dude, even the schildt books explain that. get something to read.
    hello, internet!

  10. #10
    Registered User abrege's Avatar
    Join Date
    Nov 2002
    Posts
    369
    what is a int
    I am against the teaching of evolution in schools. I am also against widespread
    literacy and the refrigeration of food.

  11. #11
    Veni Vidi Vice
    Join Date
    Aug 2001
    Posts
    343
    What is a book???

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Problem with classes.
    By kevinawad in forum C++ Programming
    Replies: 5
    Last Post: 06-26-2008, 09:33 AM
  2. College Classes
    By nubby in forum C Programming
    Replies: 2
    Last Post: 10-07-2007, 12:32 AM
  3. C++ Classes: Use, Misuse...Confusion.
    By Snorpy_Py in forum C++ Programming
    Replies: 4
    Last Post: 10-23-2006, 01:46 AM

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