zoukankan      html  css  js  c++  java
  • Modern C++ Course [Lecture 0] {Course Introduction and Hello World} & [Lecture 1] {Variables, Basic Types, Control Structures}

    http://www.ipb.uni-bonn.de/teaching/modern-cpp/

    Introduction: This page contains all the information on the course Modern C++ for Computer Vision and Image Processing including all lecture videos (also available on YouTube), lecture slides, and the homework assignments.


    2018/12/25

    Lecture_0: Course Introduction and Hello World

     https://google.github.io/styleguide/cppguide.html

     

     

    Microsoft Visual c++ compiler is exclusive in Windows.

    Here we prefer Clang, because Clang has better error explanation.


    Lecture_1: Variables, Basic Types, Control Structures 

      

     

    Google naming rules: https://google.github.io/styleguide/cppguide.html#General_Naming_Rules 

     

    auto is a new and reliable feature in c++ 11.

    [Advanced] If curious read detailed info here: http://en.cppreference.com/w/cpp/language/types 

    float numbers are imprecise, so dont do "==" operation.

    eg. (float) ??? == 2 turns into false, because ??? = 1.99999999999

     

     

     

    No project has no Vector!

     emplace_back is computationally expensive, because of the resizing.

    Use a reserve(n) to accelerate the program if you know roughly how many items are going to be.

    #include <iostream>
    #include <vector>
    #include <string>
    
    using namespace std;
    
    int main(){
    
        vector<int> int_vec = {1,2};
        cout << int_vec.front() << " " << int_vec.back() << endl;
        int_vec.emplace_back(3);
        cout << int_vec[0] << " " << int_vec[int_vec.size()-1] << endl;
    
        vector<string> str_vec = {"hello","world"};
        cout << str_vec.front() << " " << str_vec.back() << endl;
    
        return 0;
    }
    

      

    show all the warnings.

     

     

     

     

     we prefer "if" to "while"

     

    three steps:

    add - commit - push 

     References

    Cpp Core Guidelines: https://github.com/isocpp/CppCoreGuidelines

    Google Code Styleguide: https://google.github.io/styleguide/cppguide.html // kind of goes into depth

    Git guide: http://rogerdudler.github.io/git-guide/

    C++ Tutorial: http://www.cplusplus.com/doc/tutorial/

    Book: Code Complete 2 by Steve McConnell // if you feel programming is what you like, this is a book you must read in your career. And why not doing it kind of now? 

  • 相关阅读:
    POJ 1987
    POJ 3107
    POJ 1984
    POJ 1985
    【50】目标检测之目标定位
    【49】计算机视觉现状
    【48】数据扩充(Data augmentation)
    【47】迁移学习(Transfer Learning)
    【46】谷歌 Inception 网络简介Inception(2)
    【45】谷歌 Inception 网络简介Inception(1)
  • 原文地址:https://www.cnblogs.com/ecoflex/p/10177297.html
Copyright © 2011-2022 走看看