-
May 8th, 2011, 05:56 AM
#1
compiler error
i have written a function but
compiler gives this message no `void ptisi::Oura(epibaths)' member function declared in class `ptisi.' Declaration seems ok to me i cant find where is the problem .
here is the code
Code:
class ptisi{
public:
friend class Chain<ptisi>;
void show();
void initialize();
bool check(ptisi x);
bool check_2();
void update();
void Oura(epibaths n);
private:short kwdikos;
string afethria;
string proorismos;
float wra_anax;
float wra_af;
float ticket_price;
string typos;
int theseis;
int krat_theseis;
Chain<int> oura; };
Code:
void ptisi::Oura(epibaths n)
{if(oura.IsEmpty())
{oura.Insert(0,n.ar_diav);}
else
{
oura.Insert(oura.Length(),n.ar_diav);}
}
-
May 8th, 2011, 11:47 AM
#2
Re: compiler error
Originally Posted by killbill689
i have written a function but
compiler gives this message no `void ptisi::Oura(epibaths)' member function declared in class `ptisi.' Declaration seems ok to me i cant find where is the problem .
If we were to take the code you posted and tried to compile it, we would see many errors.
Code:
friend class Chain<ptisi>;
Where is the Chain class defined?
Second, your formatting is horrific.
When you post code:
1) Post the complete set of classes that require us to compile your code.
2) Please format your code -- if you're asking others to help you, at the very least make your code presentable by formatting it correctly.
Regards,
Paul McKenzie
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|