class bcdtoascold
{
private:
char bcdlist[]="0123456789ABCDEF";
public:
char bcdchar;
char firstchar(char);
char secondchar(char);
public:
bcdtoascold();
virtual ~bcdtoascold();};
这样定义说是有语法错误!
谢谢!
{
private:
char bcdlist[]="0123456789ABCDEF";
public:
char bcdchar;
char firstchar(char);
char secondchar(char);
public:
bcdtoascold();
virtual ~bcdtoascold();};
这样定义说是有语法错误!
谢谢!
解决方案 »
- 如何判断Combo控件是CBS_DROPDOWN还是CBS_DROPDOWNLIST样式
- 谁能在pudn上帮我下载一个工程
- 初学者求助改错
- 我在属性页里有建了属性页,为什么第二个属性页上面的控件不显示呢?
- ▲▲线程中用ADOQuery做聚组查询遇到ORA-00979 错误!
- 弱弱的问题:在组件内部如何从接口指针得到实现该接口的类对象指针?
- CTreeCtrl的SetItemData和GetItemData的用法,具体设置CString类型的数据!
- MFC使用Flash问题
- 发邮件时,格式化text/plain类型的数据,要遵守哪些规定?
- ADO有很多的函数是MSDN上没有提及过的,那位有他们的相关开发资料?
- 一个程序可不可能既属于DOS程序又属于Windows程序?
- 我在9x下写了个录音程序,是用api写的.在win2k下都不能用.怎么回事?有高手能回答吗?
char bcdlist[17];
然后在bcdtoascold ::bcdtoascold()中加入
strcpy(bcdtoascold,"0123456789ABCDEF");
因为类的定义里面不能对成员变量作初始化的。
这样做的时候说error C2275: 'bcdtoascold' : illegal use of this type as an expression
请问需要加什么库到这个cpp文件里面?
{
public:
static void setInterest( float newValue ) // Member function
{ currentRate = newValue; } // that accesses
// only static
// members
private:
char name[30];
float total;
static float currentRate; // One copy of this member is
// shared among all instances
// of SavingsAccount
};// Static data members must be initialized at file scope, even
// if private.
float SavingsAccount::currentRate = 0.00154;