正在加载图片...
18. A Simple Program: Adding Two Integers C++ file names can have one of several extensions Such as: cpp,. cxx or C(uppercase) Commenting A//comment is a maximum of one line long A/... /C-style comments can be more than one line long ·1 ostream Must be included for any program that outputs data to the screen or inputs data from the keyboard using C++-style stream input/output C++ requires you to specify the return type, possibl void. for all functions Specifying a parameter list with empty parentheses is equivalent to specifying a void parameter list in C o 2007 Pearson Education, Inc. All rights reserved© 2007 Pearson Education, Inc. All rights reserved. 8 18.3 A Simple Program: Adding Two Integers • C++ file names can have one of several extensions – Such as: .cpp, .cxx or .C (uppercase) • Commenting – A // comment is a maximum of one line long – A /*…*/ C-style comments can be more than one line long •iostream – Must be included for any program that outputs data to the screen or inputs data from the keyboard using C++-style stream input/output • C++ requires you to specify the return type, possibly void,for all functions – Specifying a parameter list with empty parentheses is equivalent to specifying a voidparameter list in C
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有