C++面试题大全

2011-03-19 00:28:14|?次阅读|上传:wustguangh【已有?条评论】发表评论

关键词:C/C++|来源:唯设编程网

方法二:void GetMemory2(char **p)变为二级指针.

void GetMemory2(char **p, int num)
{
	*p = (char *)malloc(sizeof(char) * num);
}

---------------------------------------------------------------------

35.程序改错

class mml
{
private:
	static unsigned int x;
public:
	mml(){ x++; }
	mml(static unsigned int &) {x++;}
	~mml{x--;}
pulic:
	virtual mon() {} = 0;
	static unsigned int mmc(){return x;}
	......                     

};
class nnl:public mml
{
private:
	static unsigned int y;
public:
	nnl(){ x++; }
	nnl(static unsigned int &) {x++;}
	~nnl{x--;}
public:
	virtual mon() {};
	static unsigned int nnc(){return y;}
	......                  
};
发表评论0条 】
网友评论(共?条评论)..
C++面试题大全