search

Home  >  Q&A  >  body text

java - What is the difference between golang's structure and object in c++?

They feel very similar, and they are similar to the c structure. Do you want to know what the specific differences are? Why not just call it an object, but a structure? Is it because this structure has no concept of class?

仅有的幸福仅有的幸福2738 days ago832

reply all(2)I'll reply

  • 阿神

    阿神2017-05-16 13:29:31

    Because writing object-oriented programming in go is different from traditional object-oriented programming. For example, go does not have abstract methods. Objects in C++ can have abstract methods.

    This article has a more detailed explanation: http://hackthology.com/golang...

    reply
    0
  • 黄舟

    黄舟2017-05-16 13:29:31

    It should be class vs structure.
    The instantiation of a class is called an object. .
    Is there a misunderstanding in the question? .

    reply
    0
  • Cancelreply