Notes on learning c++: chapter 0

chapter 0

0.2    program(application or software): a set of instructions;

    machine code(machine language or instruction set): limited set of instructions that a CPU natively understand;

   1) instruction is composed of a number of binary digits(bit):MIPS architecture(32 bit long),x86(variable length);

   2) binary digits >>>CPU(instruction set)>>> instruction;

   3) example: 10110000 01100001;

   Assembly Language: each instruction is identified by a short name, variables can be identified by names rather than numbers;

   1) translated into machine language by using an assembler and fast;

   2) depend on CPU, require a lot of instructions to do simple task, hard to be read;

   3) example: mov al, 061h;

   High-level languages: write programs without having to be as concerned about what kind of computer the program is being run on;

   1) codes>>>compiler>>>executable program>>>CPU>>program results(C,C++,Pascal,java)

   2) codes>>>interpreter>>>CPU>> program results(Perl,javascipt,java)

   3) easier to read and write, require less instructions, don‘t concern yourself with details, portable to different architecture(except platform-specific functions)

   4) example: a = 97;

0.3   C and C++‘s philosophy: trust the programmer

0.4   Define the program to be solved>>>design a solution>>>write a program that implements the solution>>>compile the program>>>link object files>>>test and debug program

   Typically, good solutions have the followng characteristics:

   1) they are straightforward;

   2) they are well documented (especially any assumptions being made);

   3) they are built modularly, so parts can be reused or changed later without impacting otherparts of the program;

   4) they are robust, and can recover or give useful error messages when something unexpected happens.

   Typical editor:lining numbering, syntax highlighting and coloring, an unambiguous font.

   A single programs can have tens if not hundreds of individual .cpp files.

   The job of compiler  is twofold:

      1) to check your program and make sure it ollows the rules of the C++ language.

   2) to convent each file of source code into a machine language file called an object file.

   For complex projects, some development environment use a makefile, which is a file that tells the compiler which files to compile.

   Linker: taking all the object files generated by the compiler and combining them into a single executable program that you can run(runtime support), it also includes files from the C++ standard library(any other precompiled libraries).

   IDE(integrated development environment) bundles and integrated steps 3,4,5, and 6 together.

0.6   Project: stores the names of all the code files we want to compile, and also saves various IDE settings.

   A console project means that we are going to creat programs that can be run from the dos or linx command-line.

   A workspace or a solution is a container that can hold one or more realted projects.

0.6a A build configuration(build target) is a collection of project setting that determines how your IDE will build your project.(a release configuration and a debug configuration)

   The debug configuration is designed to help you debug your programs, turns off all the optimizations, and includes debugging information, which makes your programs larger and slower.

   The release configuration is designed to be used when releasing your program to the public. This version is typically optimized for size and performance, and doesn‘t contain the extra debugging information.

原文地址:https://www.cnblogs.com/zimingzhu/p/8324833.html

时间: 2024-08-03 19:01:07

Notes on learning c++: chapter 0的相关文章

WITCH CHAPTER 0 [cry] 绝密开发中的史克威尔艾尼克斯的DX12技术演示全貌

西川善司的[WITCH CHAPTER 0  cry]讲座 ~绝密开发中的史克威尔艾尼克斯的DX12技术演示全貌 注:日文原文地址: http://pc.watch.impress.co.jp/docs/topic/feature/20150529_704317.html 视频引用自youtube 今年4月末,微软的开发者大会[Build 2015]在美国的旧金山举行,在这次大会的主题演讲中,[DirectX 12世代实现的次世代图实时游戏图形,[WITCH CHAPTER 0 cry](后面简

chapter 0

0.1 计算机概论 计算机:接受用户输入指令和数据经过中央处理器的数据和逻辑单元运算处理后,产生或是存储成有用的信息. 0.1.1 计算机硬件的五大单元 输入单元,输出单元,CPU的控制和算数逻辑单元,内存. 0.1.2 CPU的种类 精简指令集RISC:微指令集比较精简,执行时间比较短.完成的操作比较单纯,指令的执行性能佳. eg.SPARC(SUN),POWER PC(IBM),ARM; 复杂指令集CISC:每一个小指令可以执行一些比较低阶的硬件操作.每天指令的长度不同.花费的时间比较长,处

Natural Language Processing with Python - Chapter 0

一年之前,我做梦也想不到会来这里写技术总结.误打误撞来到了上海西南某高校,成为了文科专业的工科男,现在每天除了膜ha,就是恶补CS.导师是做计算语言学的,所以当务之急就是先自学计算机自然语言处理,打好底子准备做科研(认真脸). 进入正题,从图书馆找了本“Natural Language Processing with Python” (影印版),书长这个样子,作者是Steven Bird, Ewan Klein和Edward Loper.粘贴个豆瓣链接供参考:https://book.douba

CS 229 notes Supervised Learning

CS 229 notes Supervised Learning 标签(空格分隔): 监督学习 线性代数 Forword the proof of Normal equation and, before that, some linear algebra equations, which will be used in the proof. The normal equation Linear algebra preparation For two matrices and such that

Machine Learning Algorithms Study Notes(3)--Learning Theory

Machine Learning Algorithms Study Notes 高雪松 @雪松Cedro Microsoft MVP 本系列文章是Andrew Ng 在斯坦福的机器学习课程 CS 229 的学习笔记. Machine Learning Algorithms Study Notes 系列文章介绍 3 Learning Theory 3.1 Regularization and model selection 模型选择问题:对于一个学习问题,可以有多种模型选择.比如要拟合一组样本点,

Chapter 0.SymmetricDS快速入门指南( Quick Start Guide)

本文档是SymmetricDS3.6.14文档的第一章节Quick Start Guide文档的翻译,的目的是帮助读者快速搭建一个SymmetricDS集群并普及一些基本概念术语. 本文档描述了如何在两个SymmetricDS节点之间同步两个相同schema的数据库.下面的例子构建了一个分销业务模型,有一个中央数据库(我们叫它root或者corp节点)和多个零售商店的数据库(我们叫它client或者store节点).对于本教程,我们将只有一个store(商店)节点,如下图.如果你愿意,可以再教程

[Chapter 0] Redis 介绍与应用场景

NoSQL(NoSQL = Not Only SQL ),意即"不仅仅是SQL",是一项全新的数据库革命性运动,早期就有人提出,发展至2009年趋势越发高涨.NoSQL的拥护者们提倡运用非关系型的数据存储,相对于铺天盖地的关系型数据库运用,这一概念无疑是一种全新的思维的注入. NoSQL的特点: 处理差大量的数据 运行在廉价的PC服务器集群 解决性能瓶颈 NOSQL应用场景: 对数据高并发读写 对海量数据的高效率存储和访问 对数据的高可扩展性和高可用性 Redis is an open

Chapter 0: 引论

引论我之前就看过了,在我刚买到这本书的时候. 而我买这本书的日子,已经是两年前了.我就是这样子的,我买了好多好多关于技术的书,这些书都是很贵很贵的,可是买完回来之后就看了第一章,然后就一直丢在一边,任由灰尘堆积,也不心疼.我也不知道为什么我会这样子的. 好了不说了,扯远了. 说了是引论,就一定是在跟你扯扯什么是操作系统,主要就是讲讲操作系统的历史,讲了一些有关于硬件的知识,讲了一些基本的操作系统概念,比如进程,地址空间,以及文件等等.虽然讲得不深,但是以我现在的功力去看,还是觉得有点困难.所以后

英伟达Transfer Learning Toolkit 1.0 产品介绍、演示及技术交流

原文地址:https://www.cnblogs.com/demo-deng/p/12401535.html