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
what does :: mean and why its used
what does :: mean and why its used
Nov 14, 2013 at 12:07pm UTC
gs8
(1)
Write your question here.
what does :: mean and why its used like in string::size_type first, list<string>:: iterator i etc.
Nov 14, 2013 at 12:25pm UTC
coder777
(8444)
it's the scope operator. That means for
string::size_type
you will find
size_type
within the class (or base class) of
string
, like so:
1
2
3
4
5
6
class
string : ... { ... ... size_type ... };
The same applies to
iterator
Read this:
http://en.wikipedia.org/wiki/Scope_resolution_operator
Topic archived. No new replies allowed.