|
-
Feb 17th, 2001, 08:17 PM
#1
Thread Starter
PowerPoster
HI GUYS! I have almost finished my third operating system. It will be free for all. A lot of SKINS. BEST SERVER.
--------------------------------------------------------
JUST TO ATTRACT YOUR ATTENTION TO MY QUESTION
------------------------------------------------------------------
OK NOW!
What does this symbol mean:?
::
And another question. How do you put smilies(faces) in the message which you post in this forum?
-
Feb 17th, 2001, 09:44 PM
#2
Frenzied Member
its is used in classes for constructors and deconstructors...to construct one you would do this:
PHP Code:
class MAN
{
int addAge(int age);
};
man::addAge
{
///do all the function stuff here
}
and smilies are in the faq
-
Feb 18th, 2001, 03:57 PM
#3
Actually Steve, it's for accessing a member in a class.
Code:
cout.setf(ios::fixed);
In the above code, ios is the class, and you are accessing the fixed constant of it.
Here is another example:
Code:
class myclass {
myclass(); //constructor
~myclass(); //destructor
int dostuff(); //function
};
myclass::myclass()
{
}
myclass::~myclass()
{
}
int myclass::dostuff()
{
return(5);
}
-
Feb 18th, 2001, 05:46 PM
#4
Frenzied Member
Damn....the one question I can answer I get wrong...sorry abdul
-
Feb 21st, 2001, 07:27 PM
#5
Monday Morning Lunatic
*WARNING* Techy Bit coming up!
It's called the Scope Resolution Operator. It covers a lot more than just classes -- it also covers structs and namespaces. For example, if you have a namespace and want to call a global function with the same name as one of yours, you need it like this:
Code:
namespace parksie {
void Sleep(int param) {
::Sleep(6000);
}
};
I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
-- Linus Torvalds
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
|