Click here to Skip to main content
15,908,274 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Why my program runs well in normal LAN while die in Wireless LAN? Pin
Joaquín M López Muñoz15-May-02 22:07
Joaquín M López Muñoz15-May-02 22:07 
GeneralRe: Why my program runs well in normal LAN while die in Wireless LAN? Pin
Rickard Andersson2015-May-02 22:56
Rickard Andersson2015-May-02 22:56 
GeneralRe: Why my program runs well in normal LAN while die in Wireless LAN? Pin
15-May-02 23:02
suss15-May-02 23:02 
GeneralRe: Why my program runs well in normal LAN while die in Wireless LAN? Pin
markkuk16-May-02 1:05
markkuk16-May-02 1:05 
AnswerRe: Why my program runs well in normal LAN while die in Wireless LAN? Pin
markkuk16-May-02 1:08
markkuk16-May-02 1:08 
GeneralWhich message Windows senв to control, when I press Alt key... Pin
Alex Cramer15-May-02 21:32
Alex Cramer15-May-02 21:32 
GeneralRe: Which message Windows senв to control, when I press Alt key... Pin
Christian Graus15-May-02 22:50
protectorChristian Graus15-May-02 22:50 
GeneralCStrin passing error! Pin
tongc15-May-02 19:06
tongc15-May-02 19:06 
Hi all

I have encountered a mysterious problem. When i tried to pass the CString argument, the compiler gives me the following error

ompiling...
Assignment3_question1Doc.cpp
e:\documents and settings\administrator\my documents\st2\mfc programming\assignment3_question1\assignment3_question1doc.h(23) : error C2629: unexpected 'class CString ('
Generating Code...
Compiling...
Assignment3_question1View.cpp
e:\documents and settings\administrator\my documents\st2\mfc programming\assignment3_question1\assignment3_question1doc.h(23) : error C2629: unexpected 'class CString ('
Generating Code...
Error executing cl.exe.

Assignment3_question1.exe - 3 error(s), 0 warning(s)


This is my class definition:
class Group
{
   public:
	   
	   Group(CString &t1, CString &t2, CString &t3, CString &t4)
	   {
		   
		  team.Add(t1);
		  team.Add(t2);
		  team.Add(t3);
		  team.Add(t4);

	   }

	   CString GetTeam(int i)
	   {
			return team.GetAt(i);
	   }
	   void PutResult(int t1, int s1, int t2, int s2)
	   {
			
	   }
	   void GetLadder()
	   {

	   }

   private:

		CStringArray team;
	  
		int res[4][4];


};


and this is how i used it
Group groupA(CString("France"), CString("Uruguay"), CString("Denmark"),CString("Senegal"));


and this is the MSDN says:
Compiler Error C2629
unexpected 'token ('

A syntax error made the statement ambiguous.

This error can be caused by mixing declaration and expression syntax.

The following is an example of this error:

class B
{
   B( &B );  // error, misplaced &
   B( B& );  // OK
};


Note: I have inclulded the "Group.h" in the Document repository. This is a SDI , MFC application.

COuld you please enlighten me see where i went wrong. I have asked this couple of time but it sill give me the error.

Cheers.
GeneralRe: CStrin passing error! Pin
Christian Graus15-May-02 19:27
protectorChristian Graus15-May-02 19:27 
GeneralRe: CStrin passing error! Pin
Alexandru Savescu15-May-02 22:11
Alexandru Savescu15-May-02 22:11 
GeneralRe: CStrin passing error! Pin
Jonathan Craig16-May-02 10:32
Jonathan Craig16-May-02 10:32 
QuestionHow can I get Tabs to show inside my CMDIChildWnd's? Pin
rbc15-May-02 18:53
rbc15-May-02 18:53 
GeneralClient/Server app Pin
unknown soldier15-May-02 18:31
unknown soldier15-May-02 18:31 
GeneralRe: Client/Server app Pin
Michael P Butler15-May-02 22:20
Michael P Butler15-May-02 22:20 
GeneralRe: Client/Server app Pin
15-May-02 22:36
suss15-May-02 22:36 
GeneralRe: Client/Server app Pin
Jon Hulatt15-May-02 23:20
Jon Hulatt15-May-02 23:20 
Generaliostream problems Pin
Christian Graus15-May-02 18:20
protectorChristian Graus15-May-02 18:20 
GeneralRe: iostream problems Pin
Maxwell Chen15-May-02 18:59
Maxwell Chen15-May-02 18:59 
GeneralRe: iostream problems Pin
Christian Graus15-May-02 19:16
protectorChristian Graus15-May-02 19:16 
GeneralRe: iostream problems Pin
Maxwell Chen15-May-02 20:03
Maxwell Chen15-May-02 20:03 
GeneralRe: iostream problems Pin
Christian Graus15-May-02 20:32
protectorChristian Graus15-May-02 20:32 
GeneralRe: iostream problems Pin
Joaquín M López Muñoz15-May-02 20:47
Joaquín M López Muñoz15-May-02 20:47 
GeneralRe: iostream problems Pin
Christian Graus15-May-02 21:02
protectorChristian Graus15-May-02 21:02 
GeneralRe: iostream problems [edited] Pin
Joaquín M López Muñoz15-May-02 21:08
Joaquín M López Muñoz15-May-02 21:08 
GeneralRe: iostream problems Pin
Christian Graus15-May-02 21:11
protectorChristian Graus15-May-02 21:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.