| | |
[c++] ISO C++ forbids declaration of _ with no type
Please support our C++ advertiser: Intel Parallel Studio Home
![]() |
•
•
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)
My Blog: Yatantrika
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)
My Blog: Yatantrika
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 |
Tag cloud for C++
api application array arrays based beginner binary bmp c++ c/c++ calculator char char* class classes code coding compile compiler console conversion convert count data database delete deploy developer display dll dynamiccharacterarray email encryption error file format forms fstream function functions game generator givemetehcodez graph homeworkhelp iamthwee ifstream image input int java lib list loop looping loops map math matrix memory multiple newbie news number numbertoword output pointer problem program programming project python random read recursion recursive reference return rpg simple sorting spoonfeeding string strings struct template templates text tree url variable vector video visual visualstudio win32 windows winsock wordfrequency wxwidgets





