Why the following code returns 12 in codeblocks 13.12 and 20 in visual studio 2010? I am also confused why it returns any other value than 0 as vectors are dynamic and i have not pushed back any elements.
#include <iostream>
#include <sstream>
#include <iomanip>
#include <string>
#include <stdio.h>
#include <vector>
using namespace std;
class c
{
public:
vector<int>v;
c()
{
v.clear();
}
};
int main() {
int m;
c ob;
cout<< sizeof(ob);
}