Thread: What is "Part"?

  1. #1
    Registered User
    Join Date
    Apr 2003
    Posts
    9

    Question What is "Part"?

    Can someone please tell me what a 'part' function is used for?

    I saw it in a couple examples of code...
    something like:
    Code:
     Part do_first( Part first);
    int count();
    So can someone please like tell what 'part' is and if it could be replaced with something else, like void/int/...

    Thanks.

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    1,109
    The function is designed to return a Part object, so, no you can't change it to void/int etc. Well, actually you could probably change it to void and make the parameter a reference parameter; but then you have to go change where the fxn was being called.

    Part is most likely a user-defined class.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Part is datatype, either a class, typedef:ed structure or a typedef:ed basetype (int, char etc...).
    It functions just like any datatype. You pass one as an argument to the function, and one is returned.
    You can change it to any type you want (the function may not function properly if you do however).
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed