| | |
[c++] ISO C++ forbids declaration of _ with no type
![]() |
•
•
Join Date: Jul 2009
Posts: 1
Reputation:
Solved Threads: 0
c++ Syntax (Toggle Plain Text)
class C1{ public: C1(const C2& c){ //line 14 (works fine if i remove this constructor) //... } }; class C2{ public: C2(const C1& c){ //... } };
the compiler show me the following error:
prova.cpp:14: error: expected ‘,’ or ‘...’ before ‘&’ token
prova.cpp:14: error: ISO C++ forbids declaration of ‘C2’ with no type
Last edited by genepi; Jul 4th, 2009 at 4:40 am.
ISO C++ need you to explicitly mention the datatype after the 'const'.
At the moment of defining C1, C2 is not defined.
Read http://www.parashift.com/c++-faq-lit...html#faq-39.11
At the moment of defining C1, C2 is not defined.
Read http://www.parashift.com/c++-faq-lit...html#faq-39.11
Siddhant Sanyam
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
(Not posting much)
Migrate to Standard C++ :When to tell your C++ Code is Non-Standard.
Please Read before posting: How To Ask Questions The Smart Way
![]() |
Similar Threads
- Header file not loading (C++)
- can't build wxwidgets in cygwin (C++)
- How to cross reference objects? (C++)
- class type (C++)
- help for error (C++)
- Constructor troubles (C++)
- template issues - need expert debugger! (C++)
- program w/ switch AND nested if. six error messages (C++)
- Parse error, syntax error, Forbids declaration (C++)
Other Threads in the C++ Forum
- Previous Thread: Arrays and functions help -- base converter
- Next Thread: Program won't run outside Visual Studio 2008 Express
| Thread Tools | Search this Thread |
api array based binary bitmap c++ c/c++ char class classes classified code coding compatible compile console conversion count date delete deploy desktop developer directshow dll download dynamic dynamiccharacterarray email encryption error file filewrite forms fstream function functions game givemetehcodez graph gui homeworkhelp homeworkhelper homeworksolutions iamthwee icon if...else ifstream input int integer java lib linkedlist linker loop looping loops map math matrix memory multiple news node object output play pointer problem program programming project python random read recursion reference rpg string strings struct symbol temperature template test text text-file toolkit tree url values variable vector video win32 windows winsock wordfrequency wxwidgets





