Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

please help me handle error msg

Status
Not open for further replies.

chikon

Programmer
Sep 19, 2007
1
0
0
the error is:
error C2653: 'question' : is not a class or namespace name

my h file:
=========================================
#pragma once

using namespace std;
class question
{
public:
question(void);
private:
char[200] quest;
bool wasAnswered;
bool isCorrect;
int counter=0;
public:
char* getQuestion()=0;
void answerQestion()=0;
bool iscorrect()=0;


~question(void);
};

class yesNo::question{
bool answer;
yesNo(bool ans);
};

class open::question{
char[400] answer;
open (ans);
};

class multi::question{
char[5][200] answer;
multi (ans);

};
=============================

my c file
==================
#include "question.h"
#include "StdAfx.h"


char* question::getQuestion(){
return quest;
}







question::~question(void)
{
}
====================
thanks
 
It would help a lot if you told us which lines were causing the error. But if I had to guess, I'd say it's probably these lines:
Code:
class yesNo::question
class open::question
class multi::question
I have no idea what you're trying to do there?
 
Replace all the
Code:
class xxx::question {
with
Code:
class xxx: public question {
public:
Second public required so that you can construct the objects otherwise they are private by default.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top