下面的代码有什么问题?
class A
{
public:
A() { p=this; }
~A() { if(p!=NULL) { delete p; p=NULL; } }
A* p;
};
查看答案
数据库:抽出部门,平均工资,要求按部门的字符
串顺序排序,不能含有"human resource"部门,
employee 结构如下:employee_id, employee_name,
depart_id,depart_name,wage
在不用第三方参数的情况下,交换两个参数的值
#i nclude <stdio.h>
试题4:为什么标准头文件都有类似以下的结
构?
#ifndef __INCvxWorksh
#define __INCvxWorksh
#ifdef __cplusplus
extern "C" {
#endif
/*...*/
#ifdef __cplusplus
}
#endif
#endif /* __INCvxWorksh */
下面代码有什么问题?
Void test2()
{
char string[10], str1[10];
for(i=0; i<10;i++)
{
str1[i] ='a';
}
strcpy(string, str1);
}