'::' Please tell me what this sign means

yunjunhee 1 Reputation point
2021-10-30T14:35:50.733+00:00

Hello, I am a Korean student learning C++
While using C++, I have a few questions and I have a question.
I think M/S's answer will be of great help to me, so please let me know in detail.

  1. '::' I want to know what this sign means
  2. Please tell me why the '::' is the glyph and why it wasn't the other glyph
    For example, please tell me if you have used a pattern like '##' or a pattern like ' ` ' somewhere else.
  3. C++ developers tell us why they made object-oriented languages

Thank you for reading this article during your busy time.

Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,675 questions
Developer technologies | C++
{count} votes

7 answers

Sort by: Most helpful
  1. Deleted

    This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.


    Comments have been turned off. Learn more

  2. Bruce (SqlWork.com) 78,311 Reputation points Volunteer Moderator
    2023-10-04T23:17:32.43+00:00

    object oriented programing became popular in the 60's.

    https://en.wikipedia.org/wiki/Object-oriented_programming

    in the early 80s, there were two projects to bring classes, inhertance and polymorphism to C. Both languages want to pure supersets of C. so in both cases new syntax symbols were added.

    • objective-c: designed by Brad Cox mostly influenced by smalltalk, it added smalltak style classes and inheritance, Use used smalltalk syntax to send messages to object, [obj message], and @ prefix.
    • c++: designed by Bjarne Stroustrup, mostly influenced by simula-67. simula used the dot notation to access object properties and virtual methods. C++ implemented polymorphism without runtime binding (v-tables instead). the lack of runtime binding has led to much of the complexity of C++ requiring templates, etc.

    in C++, to allow polymorphism, two classes can define the same method name. to distinguish which Class method your code is referring to the syntax <classname>::<method name> is used. when namespaces were added, this was generalized to scoping.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.