请问这里的local function definitions are illegal怎么解决呢?
有人说是少了个{,但检查发现并没有缺漏(源代码在最下方)错误列表
Compiling...
ShowArticle.cpp
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(38) : error C2601: 'CCreate' : local function definitions are illegal
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(46) : error C2601: 'CDestroy' : local function definitions are illegal
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(52) : error C2601: 'Cshowbg' : local function definitions are illegal
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(56) : fatal error C1004: unexpected end of file found
ShowArticle.cpp
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(38) : error C2601: 'CCreate' : local function definitions are illegal
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(46) : error C2601: 'CDestroy' : local function definitions are illegal
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(52) : error C2601: 'Cshowbg' : local function definitions are illegal
g:\pspdev\jge\projects\htmlreader\showarticle.cpp(56) : fatal error C1004: unexpected end of file found
ShowArticle.cpp
// ShowArticle.cpp: implementation of the ShowArticle class.
//
//////////////////////////////////////////////////////////////////////
#include "ShowArticle.h"
#include <stdio.h>
#include <JGE.h>
#include <JRenderer.h>
#include <JLBFont.h>
#include <JGE.h>
#include <JRenderer.h>
#include <JLBFont.h>
#include <JSprite.h>
#include <JFileSystem.h>
#include <JGBKFont.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
ShowArticle::ShowArticle()
{
}
ShowArticle::~ShowArticle()
{
}
void ShowArticle::Callnull()
{
mBgTex1 = NULL;
mBg1 = NULL;
{
void ShowArticle::CCreate()
{
JRenderer* renderer = JRenderer::GetInstance();
mBgTex1 = renderer->LoadTexture("bg.jpg");
mBg1 = new JQuad(mBgTex1, 0, 0, 480, 272);
}
void ShowArticle::CDestroy()
{
SAFE_DELETE(mBgTex1);
SAFE_DELETE(mBg1);
}
void ShowArticle::Cshowbg()
{
JRenderer* renderer = JRenderer::GetInstance();
renderer->RenderQuad(mBg1, 0, 0);
}
//
//////////////////////////////////////////////////////////////////////
#include "ShowArticle.h"
#include <stdio.h>
#include <JGE.h>
#include <JRenderer.h>
#include <JLBFont.h>
#include <JGE.h>
#include <JRenderer.h>
#include <JLBFont.h>
#include <JSprite.h>
#include <JFileSystem.h>
#include <JGBKFont.h>
//////////////////////////////////////////////////////////////////////
// Construction/Destruction
//////////////////////////////////////////////////////////////////////
ShowArticle::ShowArticle()
{
}
ShowArticle::~ShowArticle()
{
}
void ShowArticle::Callnull()
{
mBgTex1 = NULL;
mBg1 = NULL;
{
void ShowArticle::CCreate()
{
JRenderer* renderer = JRenderer::GetInstance();
mBgTex1 = renderer->LoadTexture("bg.jpg");
mBg1 = new JQuad(mBgTex1, 0, 0, 480, 272);
}
void ShowArticle::CDestroy()
{
SAFE_DELETE(mBgTex1);
SAFE_DELETE(mBg1);
}
void ShowArticle::Cshowbg()
{
JRenderer* renderer = JRenderer::GetInstance();
renderer->RenderQuad(mBg1, 0, 0);
}
HTMLReader.rar
(952.06 KB)