Thread: CLine poblem

  1. #1
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470

    CLine poblem

    Hi!
    below function definition gives, error C2061(syntax error : identifier 'CList') and error C2511 ('WriteToFile' : overloaded member function 'void (class CFile,class CList<class CString,class CString &>)' not found in 'CAddressBookMFCDlg')
    Code:
    (in CAddressBookMFCDlg.h)
    void WriteToFile(CFile cfile, CList<CString, CString&> clist);
    
    (in CAddressBookMFCDlg.cpp)
    void WriteToFile(CFile cfile, CList<CString, CString&> clist)
    {
    }
    how to fix it, please?

    Thx.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,868
    shouldn't the declaration
    void WriteToFile(CFile cfile, CList<CString, CString&> clist)


    (in the cpp file) be



    void AddressBookMFCDlg::WriteToFile(CFile cfile, CList<CString, CString&> clist)
    "Man alone suffers so excruciatingly in the world that he was compelled to invent laughter."
    Friedrich Nietzsche

    "I spent a lot of my money on booze, birds and fast cars......the rest I squandered."
    George Best

    "If you are going through hell....keep going."
    Winston Churchill

  3. #3
    Android geek@02's Avatar
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    470
    oh yes. i'm sorry it's just a mistake in my message, not in the real code:

    Code:
    (in CAddressBookMFCDlg.h)
    void WriteToFile(CFile cfile, CList<CString, CString&> clist);
    
    (in CAddressBookMFCDlg.cpp)
    void CAddressBookMFCDlg::WriteToFile(CFile cfile, CList<CString, CString&> clist)
    {
    }
    i still get those 2 errors.
    GameJolt: https://gamejolt.com/@KasunL
    Game Development Youtube:
    https://is.gd/XyhYoP
    Amateur IT Blog: http://everything-geeky.blogspot.com/



    (and, sorry for my amateur English)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. prototype poblem
    By bazzano in forum C Programming
    Replies: 3
    Last Post: 10-30-2005, 10:01 AM
  2. Poblem reading struct in a file
    By The_Kingpin in forum C Programming
    Replies: 1
    Last Post: 10-24-2004, 07:02 PM