正在加载图片...
上海交通大学交大密西根 联合学院·一 ◆ 181 UM-SJTU Joint Institute University of Michigan Shanghal Jiao Tong University Composition of a Program Preprocessor those being included will be inserted into your program before #include <vg101class.h> compilation <vg101class.h>for Vg101class.lib specially #include“MsgConsoleT.h” designed for this course using namespace std; <MsgConsoleT.h>is defined for this prog. /display welcome msg * ● using namespace std /necessary int main (void) Enclosed in /*..*are comments Main function:every console program will have one and only one main function Start of the function body Body of the main function )end of the function bodyComposition of a Program Composition of a Program #include <vg101class.h> #include “MsgConsoleT.h” using namespace std; /* display welcome msg */ int main (void) { …. } • Preprocessor : those being included will be inserted into your program before compilation • <vg101class.h> for Vg101class.lib specially designed for this course • <MsgConsoleT.h> is defined for this prog. • using namespace std // necessary • Enclosed in /* … */ are comments • Main function: every console program will have one and only one main function • ‘{‘ Start of the function body • Body of the main function • ‘}’ end of the function body
<<向上翻页向下翻页>>
©2008-现在 cucdc.com 高等教育资讯网 版权所有