`
wihoho
  • 浏览: 8806 次
  • 性别: Icon_minigender_1
  • 来自: Singapore
最近访客 更多访客>>
社区版块
存档分类
最新评论

Day 1:Introduction

阅读更多

1.1 Why use a language like C++

  1.  
    1. Conciseness
    2. Maintainability
    3. 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"   
 

 

 

分享到:
评论

相关推荐

    Embedded.Systems.Introduction

    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 ...

    SAP Fiori_Training_Day_1.pdf

    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...

    Mathematica programming: an advanced introduction

    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...

    Introduction to SQL (1).ppt

    在"Introduction to SQL (1).ppt"中,我们主要探讨了SQL的基础知识,包括快速理解SQL、关系代数以及更深入的SQL概念。 首先,SQL在45分钟内的概述(对应Chapter 5)旨在让读者快速掌握SQL的基本用法。这部分可能...

    SAP Fiori_Training_Day_2.pdf

    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...

    SAP Fiori_Training_Day_3.pdf

    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...

    Bayes' Theorem Examples: A Visual Introduction For Beginners

    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' ...

    30天打造更亲和力网站.rar

    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?.....................

    Air and Spaceborne Radar Systems: An Introduction

    ""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....

    Ubuntu Pocket Guide and Reference: A concise companion for day-to-day Ubuntu use

    - **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...

    MBA in A Day

    #### 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...

    Learn.Mobile.Game.Development.in.One.Day.Using.Gamesalad

    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...

    PySpark Recipes: A Problem-Solution Approach with PySpark2

    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 ...

    Day2_202_3 CLK 2016 - 叶超 RedHat - CRIU Introduction_叶超1

    1. **实时迁移**:将一个正在运行的应用从一台服务器迁移到另一台服务器,无需中断服务。 2. **负载均衡**:根据需要在多台服务器之间移动进程,优化资源分配。 3. **高可用性**:当主服务器故障时,可以快速恢复...

    GH-Bladed software 英国培训材料(Day 1)

    GH-Bladed software 英文 水平轴风力发电机设计 wind turbine ...1.fundamentals of wind turbine.PDF 2.Introduction to bladed.PDF 3.Basic terminology_Enlish.PDF 是入门或深入学习风力发电机设计的不错的材料

    sams teach yourself c++ in 21 days

    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 ...

    Solutions.for.Introduction.to.algorithms算法导论习题答案解析

    《算法导论》(Introduction to Algorithms)是一本在计算机科学领域内被广泛使用的教材,由Thomas H. Cormen、Charles E. Leiserson、Ronald L. Rivest及Clifford Stein共同编写。本书不仅介绍了基本的算法概念和...

    Mastering.Hyper-V

    Chapter 1: Introduction to Microsoft Server 2012 R2 Hyper-V Chapter 2 : Unwrapping Hyper-V 2012 R2 Components Chapter 3 : Live Migration, Storage Migration, and Hyper-V Replica Chapter 4 : Building a ...

Global site tag (gtag.js) - Google Analytics