0

I am sorry for that I have solved it, just missing a ";" when I define the class.
I have re-edited this thread.
So sorry for flippancy!

4
Contributors
4
Replies
5
Views
10 Years
Discussion Span
Last Post by meiyantao
0

Hello,my freinds:

I'm writing a program with Qt4.The program can communicate with each other in a LAN.
Now,may ererything be ok,but the constructor is wrong,the compiler tells the fallowing:

  1. main.cpp:4: error: new types may not be defined in a return type
  2. main.cpp:4: note: (perhaps a semicolon is missing after the definition of ‘Pigeon’)
  3. main.cpp:4: error: two or more data types in declaration of ‘main’

My Pigeon.cpp file includes the following sentences that implemente the constructor.

Well, since the error is in main() on line 4, maybe looking there will help.

0

line 30 of the header file needs a semicolon

Yes,I am so sorry for that I haven't found it.
Just beacause it didn't note me find the errors in head file but in the .cpp file:'(

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.