C vs C++

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?

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
【社区内容提示】社区部分内容疑似由AI辅助生成,浏览时请结合常识与多方信息审慎甄别。
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。

推荐阅读更多精彩内容

  • **2014真题Directions:Read the following text. Choose the be...
    又是夜半惊坐起阅读 13,490评论 0 23
  • 一、 了解网络基础 web是使用一种名为HTTP(HyperText Transfer Protocol,超文本传...
    BeckJiang阅读 3,658评论 0 1
  • 今日小确幸,1.拿到了宝宝一岁的照片,好开心啊,有种家有宝贝初长成的感觉。拿到相册,我翻完一遍,没欣赏够,我又翻了...
    大果果ly阅读 1,504评论 0 0
  • 我并不觉得以前的书籍时代就一定处处完美,只是知道区别,就知道这个世界的问题在哪里,为什么我周围能谈得来的人越来越少...
    cloverblue阅读 4,127评论 0 1

友情链接更多精彩内容