cpp question

/// if I have a class as this one

1
2
3
4
5
6
7
8
9
10
11
12
13
14
class myClass
{
public:
	const char *szBuffer;
        int szBufferLength;

	int i;
};

int main()
{
	myClass mc;
	mc.i = 25;
}


The idea is, I want just one var(i) ,is that means that all variables in (myClass) take place in memory

"if yes is it better to separate them and is there a way to do so or better"
Last edited on
Yes they will.
Topic archived. No new replies allowed.