|
-
Mar 17th, 2004, 10:44 AM
#1
Thread Starter
Addicted Member
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
-
Mar 17th, 2004, 02:16 PM
#2
Not NoteMe
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. 
-
Mar 18th, 2004, 05:18 AM
#3
Hyperactive Member
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?
-
Mar 18th, 2004, 06:09 AM
#4
Fanatic Member
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)
-
Mar 18th, 2004, 07:28 AM
#5
Not NoteMe
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|