Re: Problem about initialize a mutex object in a class

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

Your class definition is missing the semicolon after the closing
brace.  My g++-4.1.1 even warns about it:

a.c:11: error: new types may not be defined in a return type
a.c:11: note: (perhaps a semicolon is missing after the definition of 'Thread')
a.c:11: error: return type specification for constructor invalid

Because of the missing semicolon, the class is parsed as the
return type of the following constructor, i.e., as in "int func()"
it parses "class { } func()", and only later notices that
constructors shouldn't have a return type.

jlh

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux