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

Error:不允许运用不完整的类型

2013-03-06 
Error:不允许使用不完整的类型include stdafx.h#include PSprite.h#include iostream#include fstr

Error:不允许使用不完整的类型
include "stdafx.h"
#include "PSprite.h"
#include <iostream>
#include <fstream>
#include <string>
using namespace std;

PSprite::PSprite(char* fileName)
{
  ifstream* fin("a.data",ios::binary);
}
提示如下图效果:
Error:不允许运用不完整的类型#
请教为什么添加了包,还会提示:不允许使用不完整的类型 ?  感激~
[解决办法]
我看到你上面的代码和下面的有点不一样:
上面的代码:
ifstream* fin("a.data",ios::binary);
下面的代码:
ifstream fin("a.data",ios::binary);
下面的应该没有什么问题.

[解决办法]
PSprite.h 文件格式有没有问题,class 结束有没有带上分号

热点排行