Skip to content

cokhane/learn_cpp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Disclaimer: This is the property of its original creator and is shared here for educational/informational purposes only. All rights belong to the original content owner,

Source: https://www.learncpp.com/

If you are the copyright owner and would like this content removed, please contact me directly. rhidzkhan.ahmad99@gmail.com

#Introduction to programs and programming language

  • the term platform refers ta compatible set of hardware and software that provides environment for software to run
  • the act of modifying a program that runs on a different platform is called porting

#Maching language

  • the set of all possible machine language instruction that a given CPU can understand is called instruction set

#Low level language cons

  • low level language are not portable
  • writing low level language is hardware

#Introduction to high level language

  • a compilter is a program that reads source code of one and trnaslate it to another language

  • an interprater is a program that directly executes the instruction in ths source code withot requiring to be compiled. interpretter is called once program is called and should be installed where the program runs

  • distributing a compiled program is safe since they do not require the source code

#Benefits of high level language

  • a program designed to run on multiple platforms is said to be cross platform
  • high level language are easier

################################# 0.3 — Introduction to C/C+

Before there was C

  • c language was developed in 1972 by dennis ritchi at bell labs,
  • there was a book name "The C Programming Language". this book which was commonly known as K&R, has become the defactor when maximun portability was needed (brian kernighan, and dennis ritchie )
  • there was ANSI C, and c99, c90

C++

  • in 1978 c++ was born. bjarne stroutstrup at bell labs. 1979 c++ adds many new fetures to the c language. best taught as a super set
  • best was it support OOP
  • (C++20’s formal name is ISO/IEC 14882:2020),
  • c++20 is the version published in 2020

C++ and C philosophy

  • c++ is designed to allow the programmer a high degree of freedom to do what they want. this also wont stop you doing thing that dont make sense
  • knowing what you should do in c++ is almost important as what you must do

What is C++ good at

  • video games
  • real time system
  • high frequency trading
  • office apps
  • embedded software
  • video audio processing
  • Ai and nueral networks

Isnt C++ dying

  • 2nd most popular compiled language behind java and c#
  • 6th over all

Do I need to know C before I do these tutorials?

  • once you know c++, it should pretty easy to learn standard C

######## Introduction to C++ development

Steps

  • define the problem to solve
  • design a solution
  • write a program that implements the solution
  • compile
  • link object files
  • test program
  • debug ( repeat in compile )

Design a solution

  • wrong approach is if you get the idea, sit down, and immediatley start coding a solution.

Good solutions have this charactheristics

  • they are straightforward not confusing and complex

  • they are well documented especially around assumption being made or limitations

  • they are built modularly, so parts can be reused or changed later without impacting other parts of the program

  • they recover gracefull or give usefull error message when something happens

  • 10-40 percent is writing program, 60 to 90 is debugging

  • so better think carefully before writing

Write the program

  • you need knowledge of a programming language, we need a text editor
  • may c++ program have only one source code file. but complex C++ programs have hundred or even thousand of code source
  • BP - write the primary source code file in each program main cpp which source code file is the primary one

################################# 0.4 — Introduction to C/C+

  • before we can write and execute our first C++ program we need to understand in more detail how C++, get developed

define the problem -> design solution -> write -> compile -> link object files -> test program -> debug ( return to compile again repeat step )

  • comming up with the initial idea for what you would like to program can be easiest step, or the hardest but conceptually, it is simplest

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •