Results 1 to 3 of 3

Thread: What the compiler talking about?

  1. #1
    NOMADMAN
    Guest

    What the compiler talking about?

    here is my code:
    Code:
    #include <iostream>
    using std :: ostream;
    using std :: istream;
    
    #include <string>
    using namespace std;
    
    enum CDCatagory { Show, Pop, Rock, Classical, Country, Religious, International, Gothic };
    
    class CD
    {
    	unsigned long int UPC;
    	string Artist;
    	string Title;
    	unsigned short int PlayTime;
    	CDCatagory Category;
    	float Price;
    	unsigned int Sold;
    public:
    	//default
    	CD();
    	CD(unsigned long int id);
    	CD(CD & c);
    	void CopyCD(CD CopyCDFrom, CD CopyCDTo) ;
    	bool operator == (const  CD c);
    	bool operator < (const CD c);
    	CD operator = (const CD c);
    	friend istream & operator >> (istream & i, CD & c);
    	friend ostream & operator << (ostream & o, const CD & c);
    };
    };
    I get these errors:

    c:\program files\microsoft visual studio\proj1\tower.h(51) : error C2143: syntax error : missing ';' before '}'
    c:\program files\microsoft visual studio\proj1\tower.h(51) : error C2143: syntax error : missing ';' before '}'
    c:\program files\microsoft visual studio\proj1\tower.h(51) : error C2143: syntax error : missing ';' before '}'
    Error executing cl.exe.

    I get these in my header file, i'm just working on the header file now so i set up a fake cpp file so I can compile.

    Thanks to anyone who trys to help

    NOMAD

  2. #2
    Hyperactive Member noble's Avatar
    Join Date
    Nov 2000
    Location
    Philly
    Posts
    471
    you have two }; at the end, get rid of one
    Bababooey
    Tatatoothy
    Mamamonkey

  3. #3
    NOMADMAN
    Guest
    THANKS!

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