PDA

Click to See Complete Forum and Search --> : New operating system...


abdul
Feb 17th, 2001, 07:17 PM
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?

SteveCRM
Feb 17th, 2001, 08:44 PM
its is used in classes for constructors and deconstructors...to construct one you would do this:

class MAN
{
int addAge(int age);
};

man::addAge
{
///do all the function stuff here
}


and smilies are in the faq :)

Feb 18th, 2001, 02:57 PM
Actually Steve, it's for accessing a member in a class.


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:


class myclass {
myclass(); //constructor
~myclass(); //destructor
int dostuff(); //function
};

myclass::myclass()
{
}

myclass::~myclass()
{
}

int myclass::dostuff()
{
return(5);
}

SteveCRM
Feb 18th, 2001, 04:46 PM
Damn....the one question I can answer I get wrong...sorry abdul :rolleyes:

parksie
Feb 21st, 2001, 06:27 PM
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:

namespace parksie {
void Sleep(int param) {
::Sleep(6000);
}
};