CLine poblem

This is a discussion on CLine poblem within the Windows Programming forums, part of the Platform Specific Boards category; Hi! below function definition gives, error C2061(syntax error : identifier 'CList') and error C2511 ('WriteToFile' : overloaded member function 'void ...

  1. #1
    Android
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    374

    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.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature english)

  2. #2
    train spotter
    Join Date
    Aug 2001
    Location
    near a computer
    Posts
    3,859
    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
    Join Date
    Mar 2004
    Location
    Kurunegala Colony, Sri Lanka, Sri Lanka
    Posts
    374
    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.
    Some useless programs i've wrote : slprogrammersheaven
    Youtube: http://www.youtube.com/user/geekyzine
    My amature IT Blog: http://everything-geeky.blogspot.com/
    My Flash games: http://flashweed.blogspot.com/

    (and, sorry for my amature 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, 09: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

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21