Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

don't understand why I am getting error C2629: unexpected 'myclass ('

Posted on 2004-04-05
4
Medium Priority
?
438 Views
Last Modified: 2013-11-20
Win2K,C++,MFC,VS.NET

I am breaking a large (~40K line) monolithic program down into multiple dll's.  In the course of this, I am having to change the way include files are handled.  For the include of one of my dialog classes, I changed the order of includes at the top of the header and now I keep getting

error C2629: unexpected 'myclass('

at the constructor line.


I have even commented _everything_ out above the class declaration & I still get the error.  Code is below:

class select_view_sort : public CDialog
{
// Construction
public:
      select_view_sort( CWnd* pParent = NULL,
                                    influx* ptr_hardware = NULL,
                                    class sort_control* ptr_msc = NULL,
                                    class depProc* ptr_depProc = NULL );   // standard constructor

      BOOL Create(int x,int y);
      void right_sort_done(void);
                ...


Any suggestions on how to troubleshoot this?

Thanks,
je
0
Comment
Question by:jesterepsilon
  • 2
4 Comments
 
LVL 44

Assisted Solution

by:Karl Heinz Kremer
Karl Heinz Kremer earned 750 total points
ID: 10762417
This can be caused by out-of-sync precompiled header files. Remove the file that stores the precompiled header information (you can find out which file this is by checking the project settings).
0
 
LVL 44

Expert Comment

by:Karl Heinz Kremer
ID: 10762433
Correction: Not which file, but wether you are using precompiled headers. The file is a .pch file in your Debug or Release directory (or whatever your output directory is).
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 10762863
If it is a precompiled header problem, then selecting "Clean" before "Rebuild" will usually fix the problem.

If that does not help, then you need to look at each of the headers that is included.  I'll guess that there is a missing } or something like that.

-- Dan
0
 
LVL 45

Accepted Solution

by:
AndyAinscow earned 750 total points
ID: 10763840
instead of
select_view_sort( CWnd* pParent = NULL,
                              influx* ptr_hardware = NULL,
                              class sort_control* ptr_msc = NULL,
                              class depProc* ptr_depProc = NULL );   // standard constructor

try
select_view_sort( CWnd* pParent = NULL,
                              influx* ptr_hardware = NULL,
                              sort_control* ptr_msc = NULL,
                              depProc* ptr_depProc = NULL );   // standard constructor


if that doesn't work then add the following lines
class sort_control;
class depProc;

before
class select_view_sort : public CDialog
{


and see if that makes any difference.
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Introduction: Dialogs (2) modeless dialog and a worker thread.  Handling data shared between threads.  Recursive functions. Continuing from the tenth article about sudoku.   Last article we worked with a modal dialog to help maintain informat…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Integration Management Part 2
Suggested Courses

926 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question