error C4430: missing type specifier - int assumed. Note: C++ does not support default-int

hi all

i am Suffering with error C4430: missing type specifier - int assumed. Note: C++ does not support default-int in my Following Code at Line "operator = ( CInPlaceCombo) {}"

When i am using the Same Code in VC++ 6.0 it working Fine but when i have converted it into VC 2008 it raise Above error.

class CInPlaceCombo : public CComboBox
// Implementation
      // Returns the instance of the class
      static CInPlaceCombo* GetInstance();

      // Deletes the instance of the class
      static void DeleteInstance();

      // Creates the Windows combo control and attaches it to the object, if needed and shows the combo ctrl
      BOOL ShowComboCtrl(DWORD dwStyle, const CRect& rCellRect, CWnd* pParentWnd, UINT uiResourceID,
                                 int iRowIndex, int iColumnIndex, CStringList* pDropDownList, CString strCurSelecetion = "", int iCurSel = -1);

// Overrides
      // ClassWizard generated virtual function overrides
      virtual BOOL PreTranslateMessage(MSG* pMsg);


      // Generated message map functions
      afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
      afx_msg void OnKillFocus(CWnd* pNewWnd);
      afx_msg void OnChar(UINT nChar, UINT nRepCnt, UINT nFlags);
      afx_msg void OnCloseup();


// Implementation
      // Constructor

      // Hide the copy constructor and operator =
      CInPlaceCombo (CInPlaceCombo&) {}

      operator = ( CInPlaceCombo) {}

      // Destructor
      virtual ~CInPlaceCombo();

// Attributes

      // Index of the item in the list control
      int m_iRowIndex;

      // Index of the subitem in the list control
      int m_iColumnIndex;

      // To indicate whether ESC key was pressed
      BOOL m_bESC;
      // Singleton instance
      static CInPlaceCombo* m_pInPlaceCombo;

      // Previous selected string value in the combo control
      CString m_strWindowText;

      // List of items to be shown in the drop down
      CStringList m_DropDownList;

Please tell me how to handle it

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Hi Ruhela,

I guess the problem is that the operator doesn't return anything.

Try implement the operator like this:

> CInPlaceCombo& operator = ( const CInPlaceCombo& ) { return *this; }

Hope that helps,


Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
VS2008 is more strict for type specifier then VS 6.0

Like earlier if you did not provide the data type for say for(i=0;condition;++i), then i is assume as int without any error. But for VS2008 it is an error for not to specify the data type as it does not assume it like earlier VS 6.0. That make it more strict in terms of type specifying. So the error that you got is just a function return type not specified, as the operator = ( CInPlaceCombo) {} is implicitly assume earlier of same to whom it is equated. But for VS2008 , you need to specify it and hence the error. Like Zoppo explained above, if you specify the return type explicitly to say what the operator = will return (or more correctly will assigned to) then the problem of not specifying the data type will be gone and it will continue work happily.
Jeez. Experts exchange does not like google chrome. It keeps messing up my posts.  

Please disregard that.
RuhelaAuthor Commented:
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Editors IDEs

From novice to tech pro — start learning today.