class Test
{
void func(){int i;}
};
int main()
{
cout<<sizeof(Test)<<endl; //gives 1
}
Why doesn't sizeof(Test) consider the size of the function. Where does the function really stored with its body? Couldn't find any link in Google explaining this.
Edit: It would be good if any good link is provided except wiki regarding the sections inside a class.