1.1 Why use a language like C++
-
- Conciseness
- Maintainability
- Portability
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 up
- cout <<: outputting some piece of text
- namespaces: like std includes a group of idemntifiers
- strings: Hello, world!
- escape sequence: \b \n...
- return 0: tell the OS it has completed successfully
3 Input
Input cin >> x
Output cout << "hello"
分享到:
相关推荐
At the end of the day, there is nothing that can be done in Mathematica and absolutely can not be done in other programming environments. For many problems however, especially those involving symbolic...
We interact with hundreds of tiny computers every day that are embedded into our houses, our cars, our toys, and our work. As our world has become more complex, so have the capabilities of the ...
Session 1: Introduction to REST (20 mins) • Session 2: Introduction to OData Service (40 mins) • Hands on 1: Build your 1 st OData Service (60 mins) ▫ Transaction: SEGW ▫ Modeling an OData Service...
在"Introduction to SQL (1).ppt"中,我们主要探讨了SQL的基础知识,包括快速理解SQL、关系代数以及更深入的SQL概念。 首先,SQL在45分钟内的概述(对应Chapter 5)旨在让读者快速掌握SQL的基本用法。这部分可能...
Session 1: Introduction to SAPUI5 / FIORI (40 mins) ▫ Basic MVC concept: Model, View, Controller ▫ UI5 Control libraries • Session 2: Introduction to SAP Web IDE (20 mins) • Hands on 1: Build your...
Session 1: Introduction to FIORI Elements (30 mins) • Hands on 1: Build a FIORI Elements application (60 mins) • Session 2: Enhance FIORI Elements Application (30 mins) • Hands on 2: FIORI Elements...
Fascinating real-life stories on how Bayes' formula is used everyday.From search and rescue to spam filtering and driverless cars, Bayes is used in many areas of modern day life. An expanded Bayes' ...
Day 1: Jackie...........3 Day 2: Michael.........4 Day 3: Bill................5 Day 4: Lillian...........6 Day 5: Marcus.........7 Day 6: Choosing a DOCTYPE.....8 Who benefits?.....................
""This introduction to the field of radar is intended for actual users of radar. It focuses on the history, main principles, functions, modes, properties and specific nature of modern airborne radar....
- **Desktop Environment**: An introduction to the Ubuntu desktop environment, including tips and techniques for efficient day-to-day usage, is provided. - **File System Navigation**: The book explores...
#### Introduction "MBA in a Day" is a comprehensive guide designed to distill the fundamental concepts and principles taught in top-tier business schools into a concise and accessible format. Authored...
Chapter 1: Introduction to Game Developmen Chapter 2: The Scenes Tab and the Stage Chapter 3: Game Objects and Gamesalad’s Co Chapter 4: Actors and Their Attributes Chapter 5: Game 1–Pachinko/Plinko...
Chapter 1: The Era of Big Data, Hadoop, and Other Big Data Processing Frameworks Chapter 2: Installation Chapter 3: Introduction to Python and NumPy Chapter 4: Spark Architecture and the Resilient ...
1. **实时迁移**:将一个正在运行的应用从一台服务器迁移到另一台服务器,无需中断服务。 2. **负载均衡**:根据需要在多台服务器之间移动进程,优化资源分配。 3. **高可用性**:当主服务器故障时,可以快速恢复...
GH-Bladed software 英文 水平轴风力发电机设计 wind turbine ...1.fundamentals of wind turbine.PDF 2.Introduction to bladed.PDF 3.Basic terminology_Enlish.PDF 是入门或深入学习风力发电机设计的不错的材料
Day 1 Getting Started Day 2 The Parts of a C++ Program Day 3 Variables and Constants Day 4 Expressions and Statements Day 5 Functions Day 6 Basic Classes Day 7 More Program Flow Week 1 in ...
《算法导论》(Introduction to Algorithms)是一本在计算机科学领域内被广泛使用的教材,由Thomas H. Cormen、Charles E. Leiserson、Ronald L. Rivest及Clifford Stein共同编写。本书不仅介绍了基本的算法概念和...