GithubHelp home page GithubHelp logo

cpptraining's Introduction

cpptraining

Programs used for c++training

Variable

Variable is a location in computer memory where you can store and retrive value. C++ is strongly typed and statically typed lanaguage. A pointer type is used store address of memory location.

Discuss issues with raw pointers.

Type safety

Means during conversion , function parameter passing or return is storing appropriate type of data which should not result in loss , incorrect interpretation or memory corruption.

Uniform initialization

C++ history

Constructor

If a constructor also initializes a given data member, the member initializer is overridden.

Constexpr

static data members and function

Order of static variable initializatoin and destruction are undefined.

Static variable in function

Static local variables retain there values between entry and exit of their scope.

Type aliases

using IntPtr = int*;

prefer type aliase over typedefs

Casting

const_cast used to remove constant ness of object Should only be used in case we don't have control over callee like libraries.

Stream

stream buffer get flushed

  1. When flushed explicitely using endl
  2. When buffer is full
  3. stream goes out of scope and destructed

Not all streams are buffered cerr is un buffered

Smart Pointer

The C++ smart pointer idiom resembles object creation in languages such as C#: you create the object and then let the system take care of deleting it at the correct time. The difference is that no separate garbage collector runs in the background memory is managed through the standard C++ scoping rules so that the runtime environment is faster and more efficient.

cpptraining's People

Contributors

prasadghole avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.