Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Andrew Shitov
Andrew Shitov exceptions etc
Latest commit aeded39 Feb 10, 2017
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
001.cpp Hello, World!" Feb 5, 2017
002.cpp more Feb 5, 2017
003.cpp more Feb 5, 2017
004.1.cpp
004.cpp
005.cpp more Feb 5, 2017
006.cpp examples Feb 5, 2017
007.cpp examples Feb 5, 2017
008.cpp examples Feb 5, 2017
009.cpp more Feb 5, 2017
010.cpp more Feb 5, 2017
011.cpp more Feb 5, 2017
012.cpp
013.cpp examples for day 2 Feb 6, 2017
014.cpp examples for day 2 Feb 6, 2017
015.cpp examples for day 2 Feb 6, 2017
016.cpp
017.cpp examples for day 2 Feb 6, 2017
018.cpp
019.cpp examples for day 2 Feb 6, 2017
020-square.cpp examples for day 2 Feb 6, 2017
020.cpp examples for day 2 Feb 6, 2017
020.h examples for day 2 Feb 6, 2017
021.cpp examples for day 2 Feb 6, 2017
022.cpp
023.cpp examples for day 2 Feb 6, 2017
024.cpp more Feb 6, 2017
025.cpp more Feb 6, 2017
026.cpp more Feb 6, 2017
027.cpp
028.cpp
029.cpp
030.cpp
031.cpp classes Feb 8, 2017
032.cpp classes Feb 8, 2017
033.cpp classes Feb 8, 2017
034.cpp
035.cpp classes Feb 8, 2017
036.cpp STL Feb 8, 2017
037.cpp STL Feb 8, 2017
038.cpp STL Feb 8, 2017
039.cpp STL Feb 8, 2017
040.cpp STL Feb 8, 2017
041.cpp
042.cpp
043.cpp
044.cpp STL Feb 8, 2017
045.cpp STL Feb 8, 2017
046.cpp STL Feb 8, 2017
047.cpp strings Feb 8, 2017
048.cpp strings Feb 8, 2017
049.cpp strings Feb 8, 2017
050.cpp
051.cpp io Feb 8, 2017
052.cpp io Feb 8, 2017
053.cpp io Feb 8, 2017
054.cpp
055.cpp
056.cpp
057.cpp exceptions Feb 9, 2017
058.cpp merge Feb 9, 2017
059.cpp merge Feb 9, 2017
060.cpp ellipsis Feb 9, 2017
061.c extern "C" Feb 9, 2017
061.cpp
062.c
062.cpp
063.cpp
063.h shared Feb 9, 2017
063a.cpp shared Feb 9, 2017
063b.cpp shared Feb 9, 2017
064.f90
065.cpp f90 Feb 9, 2017
065.f90 f90 Feb 9, 2017
1.cpp
10.cpp day1 Feb 6, 2017
100.cpp classes Feb 8, 2017
101.cpp classes Feb 8, 2017
102.cpp
102a.cpp classes Feb 8, 2017
102a.h day 3 Feb 8, 2017
103.cpp classes Feb 8, 2017
104.cpp classes Feb 8, 2017
105.cpp classes Feb 8, 2017
106.cpp day 3 Feb 8, 2017
107.cpp
108.cpp day 3 Feb 8, 2017
109.cpp day 3 Feb 8, 2017
11.cpp
110.cpp day 3 Feb 8, 2017
111.cpp day 3 Feb 8, 2017
112.cpp day 3 Feb 8, 2017
113.cpp day 3 Feb 8, 2017
113a.cpp day 3 Feb 8, 2017
113a.h day 3 Feb 8, 2017
114.cpp more on classes Feb 9, 2017
115.cpp
116.cpp more on classes Feb 9, 2017
117.cpp more on classes Feb 9, 2017
118.cpp more on classes Feb 9, 2017
119.cpp
12.cpp day1 Feb 6, 2017
120.cpp
121.cpp more from day 4 Feb 9, 2017
122.cpp
123.cpp more from day 4 Feb 9, 2017
124.cpp more from day 4 Feb 9, 2017
125.cpp more from day 4 Feb 9, 2017
126.cpp more from day 4 Feb 9, 2017
127.cpp
128.cpp more from day 4 Feb 9, 2017
129.cpp more from day 4 Feb 9, 2017
13.cpp
130.cpp more from day 4 Feb 9, 2017
131.cpp
132.cpp more from day 4 Feb 9, 2017
133.cpp day 5/1 Feb 10, 2017
134.cpp day 5/1 Feb 10, 2017
134a.cpp day 5/1 Feb 10, 2017
134a.h day 5/1 Feb 10, 2017
135.cpp day 5/1 Feb 10, 2017
137.cpp
137a.c day 5/1 Feb 10, 2017
137a.cpp day 5/1 Feb 10, 2017
138.cpp day 5/1 Feb 10, 2017
138.f90
139.cpp day 5/1 Feb 10, 2017
14.cpp day1 Feb 6, 2017
140.cpp day 5/1 Feb 10, 2017
141.cpp day 5/1 Feb 10, 2017
142.cpp
143.cpp
144.cpp
145.cpp
146.cpp day 5/1 Feb 10, 2017
147.cpp day 5/1 Feb 10, 2017
148.cpp day 5/1 Feb 10, 2017
149.cpp day 5/1 Feb 10, 2017
15.cpp day1 Feb 6, 2017
150.cpp
151.cpp
152.cpp day 5/1 Feb 10, 2017
153.cpp day 5/1 Feb 10, 2017
154.cpp exceptions etc Feb 10, 2017
155.cpp
156.cpp
157.cpp exceptions etc Feb 10, 2017
158.cpp
159.cpp exceptions etc Feb 10, 2017
16.cpp day1 Feb 6, 2017
160.cpp exceptions etc Feb 10, 2017
17.cpp day1 Feb 6, 2017
18.cpp day1 Feb 6, 2017
19.cpp day1 Feb 6, 2017
2.cpp day1 Feb 6, 2017
20.cpp day1 Feb 6, 2017
21.cpp day1 Feb 6, 2017
22.cpp day1 Feb 6, 2017
23.cpp day1 Feb 6, 2017
24.cpp
25.cpp
26.cpp day1 Feb 6, 2017
27.cpp day1 Feb 6, 2017
28.cpp
29.cpp day1 Feb 6, 2017
3.cpp day1 Feb 6, 2017
30.cpp
31.cpp day1 Feb 6, 2017
32.cpp day1 Feb 6, 2017
33.cpp day1 Feb 6, 2017
34.cpp day1 Feb 6, 2017
35.cpp
36.cpp day1 Feb 6, 2017
37.cpp
38.cpp
39.cpp R string with delimiter Feb 6, 2017
4.cpp
40.cpp
41.cpp day1 Feb 6, 2017
42.cpp update day 2 Feb 7, 2017
43.cpp
44.cpp update day 2 Feb 7, 2017
45.cpp update day 2 Feb 7, 2017
46.cpp update day 2 Feb 7, 2017
47.cpp
48.cpp update day 2 Feb 7, 2017
49.cpp update day 2 Feb 7, 2017
5.cpp day1 Feb 6, 2017
50.cpp
51.cpp update day 2 Feb 7, 2017
52.cpp update day 2 Feb 7, 2017
53.cpp update day 2 Feb 7, 2017
54.cpp update day 2 Feb 7, 2017
55.cpp update day 2 Feb 7, 2017
56.cpp update day 2 Feb 7, 2017
57.cpp update day 2 Feb 7, 2017
58.cpp update day 2 Feb 7, 2017
59.cpp update Feb 7, 2017
6.cpp day1 Feb 6, 2017
60.cpp
61.cpp
62.c day 5/1 Feb 10, 2017
62.cpp update Feb 7, 2017
63.cpp update Feb 7, 2017
64.cpp update Feb 7, 2017
64.h update Feb 7, 2017
65.cpp update Feb 7, 2017
66.cpp update Feb 7, 2017
67.cpp update Feb 7, 2017
68.cpp more Feb 7, 2017
69.cpp more Feb 7, 2017
7.cpp
70.cpp more Feb 7, 2017
71.cpp more Feb 7, 2017
72.cpp more Feb 7, 2017
73.cpp
74.cpp examples of day 2 Feb 7, 2017
75.cpp examples of day 2 Feb 7, 2017
76.cpp examples of day 2 Feb 7, 2017
77.cpp examples of day 2 Feb 7, 2017
78.cpp examples of day 2 Feb 7, 2017
79.cpp examples of day 2 Feb 7, 2017
8.cpp day1 Feb 6, 2017
80.c
80.cpp classes Feb 8, 2017
81.cpp examples of day 2 Feb 7, 2017
82.cpp examples of day 2 Feb 7, 2017
83.cpp
84.cpp
85.cpp examples of day 2 Feb 7, 2017
86.cpp classes Feb 8, 2017
87.cpp
88.cpp classes Feb 8, 2017
89.cpp
9.cpp day1 Feb 6, 2017
90.cpp classes Feb 8, 2017
91.cpp
92.cpp
93.cpp classes Feb 8, 2017
94.cpp classes Feb 8, 2017
95.cpp classes Feb 8, 2017
96.cpp classes Feb 8, 2017
97.cpp
98.cpp
99.cpp classes Feb 8, 2017
README.txt update Feb 9, 2017

README.txt

DAY 1

Variables and types
    Identifiers
    Fundamental data types
    Declaration of variables
    Initialization of variables
    * Type deduction: auto and decltype
    Introduction to strings

Constants
    Literals
        Integer Numerals
        Floating Point Numerals
        Character and string literals
        Other literals (null, true, false, nullptr)
    Typed constant expressions

Operators
    Assignment operator (=)
    Arithmetic operators ( +, -, *, /, % )
    Compound assignment (+=, etc.)
    Increment and decrement
    Relational and comparison operators
    Logical operators (!, &&, ||)
    Conditional ternary operator
    Comma operator
    Bitwise operators (&, |, ^, ~, <<, >>)
    Explicit type casting operator
    sizeof
    Precedence of operators

Basic Input/Output
    cout, cin
    cerr, clog
    cin and strings
    * stringstream

Statements and flow control
    Selection statements: if and else
    Iteration statements (loops)
        The while loop
        The do-while loop
        The for loop
        * Range-based for loop
    Jump statements
        break
        continue
        goto
    switch

Arrays
    Accessing the values of an array
    Multidimensional arrays
    * Arrays as parameters

Character sequences
    Initialization of null-terminated character sequences
    Strings and null-terminated character sequences


DAY 2

Associativity
    left-to-right (-)
    right-to-left (=)
        = and bool

Ternary operator

Enums
    declare enums
        start with non-1
    scoped and unscoped enums
    enum : type (C++11)

Functions
    signature
    return
    void
    The return value of main
    Arguments passed by value and by reference
        const references
    Inline functions
    Default values in parameters
        More than one arguments
    static variables
    functions with no arguments
        f(void)
    main(int argc, char* argv[]) arguments
    Recursive functions

Compiling and linking
    * Declaring functions and *.h
        function prototypes
        compile multiple files
        link object libraries
    * inline and optimization (-S -O3)
    name-mangling

Overloads and templates
    Overloaded functions
    * Function templates
    * auto and nullptr

Name visibility
    Scopes
    Namespaces
    using
    Namespace aliasing
    The std namespace
    Global variables (static storage)

* Pointers
    Address-of operator (&)
    Dereference operator (*)
    Declaring pointers
    Pointers and arrays
    Pointer arithmetics
    * Pointers and const
    Pointers and string literals
    Pointers to pointers
    void pointers
    Pointers to functions
    Dynamic memory
        int *p = new int[5];
        delete[] p;    

C strings
    input/output <stdio.h>
        printf
        int puts ( const char * str );
        putchar(c)
        int getchar ( void );
        char * gets ( char * str );
    operations with strings <string.h> <cstring>
        int strcmp ( const char * str1, const char * str2 );
        char * strcat ( char * destination, const char * source );
        char * strcpy ( char * destination, const char * source );


DAY 3

Flashback
    itoa => sprintf (80.cpp)

Structs
    Structs
    unions
    access using pointers
    pointers to structures (->)
    initializing struct fields
    struct and variable at one go
    anonymous struct
    array of structs
    
Classes
    class definitions
        create objects        
        T t;
        //T t();
        T t = T();

    data members
    member functions
        double getVolume(void);//
        scope (resolution) operator ::
        out-of-line definitions
        get/set values
    access modifiers
        public
        private
        protected
        class vs struct
    constructor
        T::T()
        default constructor
        Parameterized Constructor
            Default is not created
        Initialization Lists
        delegating constructors (C++11)
    destructor
        no void, no return
    copy constructor
        T(const T&) // cannot take T but can T&
        example: class with char*
    friend functions
        friend classes
        friends are not members (-S)
    inline functions
    this
        T * const this = &current_obj
        this->arg vs arg
        ext_f(this)    
    Pointer to classes
    static members
        static data member
            counter
            with [] (031.cpp)
        static functions
            call as C::f()
    const member functions
    intreface and implementation (.h)
        static data members


DAY 4

    inheritance
        base, derived classes
        type of inheritance
        access control
        multiple inheritance
    overloading operators (034.cpp)
        unary (-, ++, --, !)
        binary (+, -)
        relational (<, ==, etc.)
        assignment (=)
        function call ()
        subscripting []
        member access ->
    polymorphism
        virtual functions // shape
    abstract classes (interfaces)

    Templates    

STL
    Containers
        array (037.cpp)
            fixed size, not expandable
            size()
            operator[]
            at()
            iterating using range-based for loop
        vector (038.cpp)
            push_back
            size
            empty
            capacity
            max_size
            resize
            pop_back
            clear        
        deque
            push_back
            push_front
        pair <utility>
            first, second
    Iterators
        list
            list<int>::iterator
            const_reverse_iterator
            rbegin
            rend     


DAY 5

    Algorithms
        find
            isert in vector (042.cpp)
            delete
        sort
            as member of container (list.sort, 043.cpp)
            as std::sort(begin, begin+4)
        min_element, max_element        
    Container adaptors
        queue
            push
            front
            back (not end)
            pop
        stack
            push
            top
            pop
        priority queue (046.cpp)
            top
            pop
    Associative containers
        set
            insert
            erase
            find
        map
            iter->first, iter->second
    <string>
        iterators (and rbegin, begin, end, rend)
        auto instead of iterators
        for (auto x : s)
        size, length
        [], at
        +, +=
        c_str
        find, string::npos
    <iomanip>
        setw
        setfill
        setbase
        setprecision
        > exersise: print table
        hex
        setiosflags/resetiosflags (std::ios::showbase | std::ios::uppercase);
    <sstream>
        <<
        str(), c_str()
        >>
    ifstream
        http://www.cplusplus.com/reference/ios/
        open
        close
        char c = f.get()
        eof
        getline(f, s)
    ofstream
        ofstream::out, ofstream::app
    *input/output (<<, >>) overloading for classes
        ostream& operator<<(ostream& o, C& c)
    <typeinfo>
        typeid(...).name()
    exceptions
        try/throw/catch
        throw int, throw string
        catch(...)
        <exception>, virtual const char* what() const throw()
        bad_alloc
        catch divide by zero
Misc
    cstdlib vs stdlib.h
    ellipsis ... and cstdarg
        va_list, va_start, va_arg, va_end
    typedef
    namespace {}
    namespace alias
    delete vs delete[]

Linking
    extern variables
    extern "C"
        call C function from C++
            No overloading in C
        call C++ function from C
            wrapper for overloaded functions
    static libraris
        -c
    dynamic libraries
        -shared libtest.so
        -L. -ltest
        ar crv libtest.a
        nm
    fortran linking
        name_
        args by ref
        link with gfortran

TODO
    Internet
        server
        client
    Databases
    Unicode
    Date and time
    threads
    parallel and cuncurrent programming
    programming for Windows
    Elements of Boost
You can’t perform that action at this time.