C vs C++

作者: HenryTien | 来源:发表于2017-04-05 08:23 被阅读16次

    C vs C++

    Q: How do you link a C++ program to C functions?

    Q: Is there anything you can do in C++ that you cannot do in C?

    Q: What are the differences between a struct in C and in C++?

    Q: What does extern "C" int func(int *, Foo) accomplish?

    Q: What are the access privileges in C++? What is the default access level?

    Q:How does C++ help with the tradeoff of safety vs. usability?

    Overlording Operator

    Q: Name the operators that cannot be overloaded?

    Q: What is overloading??

    Q: How are prefix and postfix versions of operator++() differentiated?

    Q: Can you overload a function based only on whether a parameter is a value or a reference?

    Q: What are the benefits of operator overloading?

    Q: But operator overloading makes my class look ugly; isn't it supposed to make my code clearer?

    Q: What operators can/cannot be overloaded?

    Q: Can I overload operator== so it lets me compare two char[] using a string comparison?

    Q: Can I create a operator** for "to-the-power-of" operations?

    Q: Okay, that tells me the operators I can override; which operators should I override?

    Q: What are some guidelines / "rules of thumb" for overloading operators?

    相关文章

      网友评论

          本文标题:C vs C++

          本文链接:https://www.haomeiwen.com/subject/pndcottx.html