Elegant way to add a value to a member variable inside a vector
You could use a range-based for loop and push_back( Pressure(i,i) ).

#include &lt;iostream&gt;
#include &lt;vector&gt;

class Pressure {
public:
    Pressure(int date, int time) : m_date(date), m_time(time) {

    }

    int GetDate() const {
        return m_date;
    }

    int GetTime() const {
        return m_time;
    }

    void AddTime(int val) {
        m_time += val;
    }
private:
    int m_date;
    int m_time;
};

int main() {
    std::vector&lt;Pressure&gt; p;

    // populate the vector with values.
    p.reserve(10); // you can reserve space if you know the size ahead of time to prevent extra reallocations, but it isnt necessary for a vector this small.
    for(int i = 0; i &lt; 10; ++i) {
        p.push_back( Pressure(i,i) );
    }

    for(Pressure&amp; pressure : p) {
        // add offset
        pressure.AddTime(20000);

        // display data
        std::cout &lt;&lt; pressure.GetDate() &lt;&lt; " " &lt;&lt; pressure.GetTime() &lt;&lt; "\n";
    }

    return 0;
}