首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > 编程 >

Day 一:Introduction

2012-10-31 
Day 1:Introduction1.1 Why use a language like C++?ConcisenessMaintainabilityPortability1.2 The comp

Day 1:Introduction
1.1 Why use a language like C++

    ?
      ConcisenessMaintainabilityPortability
1.2 The compilation process?? ? ? ? sorce file>>>Prcessed code>>>Object file

?

1.3 General notes on C++

?

?? ? ? ? ? ? case sensitive

2.1 hello world
/*  * File:   main.cpp * Author: Gong Li * * Created on June 24, 2011, 9:18 PM */#include <iostream>using namespace std;/* *  */int main() {    std::cout<<"Hello,world!";    return 0;}
?
2.2 Tokens

?? ? ? ? ? ?keywords, identifiers,literals, operators, punctuation, whitespace

?

2.3 Explaination

?

comment: ? ? ? ? ? //.... or /*....*/#include: ? ? ? ? ? the preprocessor dumping in the content of another file.int main(){}: ? ? execute when the program starts upcout <<: ? ? ? ? ? ?outputting some piece of textnamespaces: ? ?like std includes a group of idemntifiersstrings: ? ? ? ? ? ? Hello, world!escape sequence: \b ?\n...return 0: ? ? ? ? ? tell the OS it has completed successfully

?

3 Input

?? ? ?Input ?cin >> x
?? ?

?? ? Output cout << "hello" ??
?

?

?

热点排行