电脑桌面
添加小米粒文库到电脑桌面
安装后可以在桌面快捷访问

完整版C++编程思想答案其他章节点击用户名找thinkinginC+VIP免费

完整版C++编程思想答案其他章节点击用户名找thinkinginC+_第1页
1/24
完整版C++编程思想答案其他章节点击用户名找thinkinginC+_第2页
2/24
完整版C++编程思想答案其他章节点击用户名找thinkinginC+_第3页
3/24
[ Viewing Hints ] [ Book Home Page ] [ Free Newsletter ] [ Seminars ] [ Seminars on CD ROM ] [ Consulting ] Annotated Solution Guide Revision 1.0 for Thinking in C++, 2nd edition, Volume 1by Chuck Allison ? 2001 MindView, Inc. All Rights Reserved.[ Previous Chapter ] [ Table of Contents ] [ Next Chapter ] Chapter 1111-1Turn the “ bird & rock” code fragment at the beginning of this chapter into a C program (using structs for the data types), and show that it compiles. Now try to compile it with the C++ compiler and see what happens. (Left to the reader) 11-2Take the code fragments in the beginning of the section titled “ References in C++” and put them into a main( ) . Add statements to print output so that you can prove to yourself that references are like pointers that are automatically dereferenced. (Left to the reader) 11-3Write a program in which you try to (1) Create a reference that is not initialized when it is created. (2) Change a reference to refer to another object after it is initialized. (3) Create a NULL reference. (Left to the reader) 11-4Write a function that takes a pointer argument, modifies what the pointer points to, and then returns the destination of the pointer as a reference. (Left to the reader) 11-5Create a class with some member functions, and make that the object that is pointed to by the argument of Exercise 4. Make the pointer a const and make some of the member functions constand prove that you can only call the const member functions inside your function. Make the argument to your function a reference instead of a pointer. (Left to the reader) 11-6Take the code fragments at the beginning of the section titled “ Pointer references...

1、当您付费下载文档后,您只拥有了使用权限,并不意味着购买了版权,文档只能用于自身使用,不得用于其他商业用途(如 [转卖]进行直接盈利或[编辑后售卖]进行间接盈利)。
2、本站所有内容均由合作方或网友上传,本站不对文档的完整性、权威性及其观点立场正确性做任何保证或承诺!文档内容仅供研究参考,付费前请自行鉴别。
3、如文档内容存在违规,或者侵犯商业秘密、侵犯著作权等,请点击“违规举报”。

碎片内容

完整版C++编程思想答案其他章节点击用户名找thinkinginC+

确认删除?
VIP
微信客服
  • 扫码咨询
会员Q群
  • 会员专属群点击这里加入QQ群
客服邮箱
回到顶部