Hi guys, Im using library of STL called #include <vector>
when I have a vector like this:
I do push_back(10) 10times, then I do v.clear() then if I do v.size() then it will return zero... what's confusing is how PC can know that we have cleared the vector and it's size is zero?! because it's really complicated to imagine it.. could anyone help me how can PC clear the values of vector and update that the size of vector is zero?!Code:vector<int> v
what's confusing me that Im not accepting that idea in freshy way that PC can after cleaning the vector will return zero .. it's like human thinking but how does he do that? really weird .. is it maybe system call to do clear for data?!