Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
CODE PROJECT For Those Who Code
  • Home
  • Articles
  • FAQ
Community
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. Resolved:Help solving: error C2653: 'FindUserDlg' : is not a class or namespace name [modified]

Resolved:Help solving: error C2653: 'FindUserDlg' : is not a class or namespace name [modified]

Scheduled Pinned Locked Moved C / C++ / MFC
c++helpcsharpvisual-studiocom
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    method007
    wrote on last edited by
    #1

    hi all . could any one help me fix this compilation error. I am using visual studio 6.Thanks error : -------------------Configuration: FindUser - Win32 Debug-------------------- Compiling... FindUser.cpp FindUserDlg.cpp C:\visualC\FindUser\FindUserDlg.cpp(15) : error C2653: 'FindUserDlg' : is not a class or namespace name Generating Code... Error executing cl.exe. FindUser.exe - 1 error(s), 0 warning(s) pointing at : int FindUserDlg::GetPosByNick(CString szNick) { in FindUserDlg.cpp : implementation file error pic: [img]http://i5.photobucket.com/albums/y180/method007/error3.jpg\[/img\] finduserdlg.h content // FindUserDlg.h : header file // #if !defined(AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_) #define AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// // CFindUserDlg dialog class CFindUserDlg : public CDialog { // Construction public: CFindUserDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CFindUserDlg) enum { IDD = IDD_FINDUSER_DIALOG }; // NOTE: the ClassWizard will add data members here //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CFindUserDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CFindUserDlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnButton1(); //}}AFX_MSG DECLARE_MESSAGE_MAP() **public: int GetPosByNick(CString szNick);** ======== placed it here }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_) -- modified at 16:31 Monday 10th July, 2006

    J R 2 Replies Last reply
    0
    • M method007

      hi all . could any one help me fix this compilation error. I am using visual studio 6.Thanks error : -------------------Configuration: FindUser - Win32 Debug-------------------- Compiling... FindUser.cpp FindUserDlg.cpp C:\visualC\FindUser\FindUserDlg.cpp(15) : error C2653: 'FindUserDlg' : is not a class or namespace name Generating Code... Error executing cl.exe. FindUser.exe - 1 error(s), 0 warning(s) pointing at : int FindUserDlg::GetPosByNick(CString szNick) { in FindUserDlg.cpp : implementation file error pic: [img]http://i5.photobucket.com/albums/y180/method007/error3.jpg\[/img\] finduserdlg.h content // FindUserDlg.h : header file // #if !defined(AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_) #define AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// // CFindUserDlg dialog class CFindUserDlg : public CDialog { // Construction public: CFindUserDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CFindUserDlg) enum { IDD = IDD_FINDUSER_DIALOG }; // NOTE: the ClassWizard will add data members here //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CFindUserDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CFindUserDlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnButton1(); //}}AFX_MSG DECLARE_MESSAGE_MAP() **public: int GetPosByNick(CString szNick);** ======== placed it here }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_) -- modified at 16:31 Monday 10th July, 2006

      J Offline
      J Offline
      Jun Du
      wrote on last edited by
      #2

      You should use the DECLARE_MESSAGE_MAP() macro at the end of your class declaration; no more declaration/defintion after it. Best, Jun

      1 Reply Last reply
      0
      • M method007

        hi all . could any one help me fix this compilation error. I am using visual studio 6.Thanks error : -------------------Configuration: FindUser - Win32 Debug-------------------- Compiling... FindUser.cpp FindUserDlg.cpp C:\visualC\FindUser\FindUserDlg.cpp(15) : error C2653: 'FindUserDlg' : is not a class or namespace name Generating Code... Error executing cl.exe. FindUser.exe - 1 error(s), 0 warning(s) pointing at : int FindUserDlg::GetPosByNick(CString szNick) { in FindUserDlg.cpp : implementation file error pic: [img]http://i5.photobucket.com/albums/y180/method007/error3.jpg\[/img\] finduserdlg.h content // FindUserDlg.h : header file // #if !defined(AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_) #define AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 ///////////////////////////////////////////////////////////////////////////// // CFindUserDlg dialog class CFindUserDlg : public CDialog { // Construction public: CFindUserDlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CFindUserDlg) enum { IDD = IDD_FINDUSER_DIALOG }; // NOTE: the ClassWizard will add data members here //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CFindUserDlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CFindUserDlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnButton1(); //}}AFX_MSG DECLARE_MESSAGE_MAP() **public: int GetPosByNick(CString szNick);** ======== placed it here }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_FINDUSERDLG_H__8EF5BE4C_79B2_4F61_B376_E2A019C98B9C__INCLUDED_) -- modified at 16:31 Monday 10th July, 2006

        R Offline
        R Offline
        RChin
        wrote on last edited by
        #3

        I may be wrong, but shouldn't the implementation be : int **C**FindUserDlg::GetPosByNick(CString szNick) { .. }?, Not int FindUserDlg::GetPosByNick(CString szNick).. As shown in your pic.


        I Dream of Absolute Zero

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups