首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 开发语言 > C++ >

请教这段代码错哪了?(新手提问)

2012-02-21 
请问这段代码哪里错了?(新手提问)#include stdafx.h#include iostreamusing namespace stdclass appl

请问这段代码哪里错了?(新手提问)
#include "stdafx.h"
#include "iostream"
using namespace std;

class application
{
protected:
char appcode[4];
int storagespace;
public:
void getapp();
void showapp();
};
class spellchecker:public application
{
protected:
char lang[5];
public:
void getspell();
void showspell();
};
class calculator:virtual public application
{
protected:
int noofoperations;
public:
void getcal();
void showcal();
};
class spreadsheet:public spellchecker,public calculator
{
private:
int noofsheets;
public:
void getsheet();
void showsheet();
};
int _tmain(int argc, _TCHAR* argv[])
{
spreadsheet s;
s.getsheet();
s.showsheet();
return 0;
}


[解决办法]
你的成员函数还没定义就在main中开始调用了
[解决办法]
class 方法的实现部分呢?
[解决办法]
一楼的正解,成员函数只有声明,没定义哈!
[解决办法]
LS的

热点排行