Search:

Type: Posts; User: vart

Search: Search took 0.06 seconds.

  1. Replies
    11
    Views
    823

    As a afterthought though - it seems usage of...

    As a afterthought though - it seems usage of std::min_element would be even more suitable here

    Something along the lines:



    #include <algorithm> // std::min_element, std::max_element...
  2. Replies
    11
    Views
    823

    You should declare variables in the smallest...

    You should declare variables in the smallest possible scope to avoid such problems...



    #include <vector>
    class Vehicle
    {
    public:
    int getYear(){return 2015;}
    };
Results 1 to 2 of 2