Results 1 to 5 of 5

Thread: Cpp n00b= What is a public static void ???

  1. #1

    Thread Starter
    Addicted Member señorbadger's Avatar
    Join Date
    Oct 2003
    Location
    Mud pools of wellingborough
    Posts
    193

    Cpp n00b= What is a public static void ???

    i have to learn c++ at university next year and i cant get my head around a public static void

    if you convert this word for word i have gavered

    public = self explanitory
    static = doesnt change
    void = empty space


    this is really confusing me

  2. #2
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Static means that the value of the variable declared with this will be retained even when out of scope.
    Void is often used to signify that a function returns nothing.
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


  3. #3
    Hyperactive Member
    Join Date
    Jul 2002
    Location
    WGTN, New Zealand
    Posts
    338
    A void pointer is a pointer with no specific type, in order to get the value it points to you must cast a type onto it.

    Is it a pointer?

  4. #4
    Fanatic Member
    Join Date
    Dec 2003
    Posts
    703
    a "public static void" function sounds rather like java, because the public is with the function declaration.

    a public static void function is a function that:

    1. is callable from outside the class it's declared in (public)
    2. is not actually a member of the class; it is callable without an instance of the class. (static)
    3. returns nothing (void)
    an ending

  5. #5
    Not NoteMe SLH's Avatar
    Join Date
    Mar 2002
    Location
    192.168.0.1 Preferred Animal: Penguin Reason for errors: Line#38
    Posts
    3,051
    Originally posted by Dreamlax
    A void pointer is a pointer with no specific type, in order to get the value it points to you must cast a type onto it.

    Is it a pointer?
    Yes, it's a pointer (it just doesn't know what it's pointing at).
    Quotes:
    "I am getting better then you guys.." NoteMe, on his leet english skills.
    "And I am going to meat her again later on tonight." NoteMe
    "I think you should change your name to QuoteMe" Shaggy Hiker, regarding NoteMe
    "my sweet lord jesus. I've decided never to have breast implants" Tom Gibbons
    Have I helped you? Please Rate my posts.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width