Till now what we've covered has been essentially C with a few tweaks, notably cin and cout. Now it's time to add the thing that puts the + in C++: classes. They won't give us new abilities like cin/cout, SSDL functions, or control structures like loops. What they will do is help us keep things organized so we don't get confused, minimize errors, and make expressing things simpler – so we can trust the code we write and use it for bigger and better projects.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Classes

  • Will Briggs

摘要

Till now what we've covered has been essentially C with a few tweaks, notably cin and cout. Now it's time to add the thing that puts the + in C++: classes. They won't give us new abilities like cin/cout, SSDL functions, or control structures like loops. What they will do is help us keep things organized so we don't get confused, minimize errors, and make expressing things simpler – so we can trust the code we write and use it for bigger and better projects.