cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
friendship
friendship
Apr 14, 2009 at 4:13am UTC
masiht
(222)
hello ,
I want to ask If there is any difference between friend and scope operator ?
Apr 14, 2009 at 8:32am UTC
Bazzy
(6281)
A class friend is something that can access the class private members.
The scope operator is used to get symbols from namespaces or classes and can be used for class static members.
::something
means that 'something' is from the global scope
Here is a tutorial on friendship:
http://www.cplusplus.com/doc/tutorial/inheritance/
Apr 14, 2009 at 7:30pm UTC
masiht
(222)
so you mean both have the same function and we can use it alternatively.
Apr 14, 2009 at 8:40pm UTC
Bazzy
(6281)
No, they aren't related.
Topic archived. No new replies allowed.