CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: compiler error

  1. #1
    Join Date
    Apr 2011
    Posts
    16

    Unhappy 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);}
    	
    	}

  2. #2
    Join Date
    Apr 1999
    Posts
    27,449

    Re: compiler error

    Quote Originally Posted by killbill689 View Post
    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
  •  





Click Here to Expand Forum to Full Width

Featured