Errors compiling in Microsoft Visual C++ 2005

Posted on 2006-04-12
Last Modified: 2008-01-09
i am trying to compile a vc project in Microsoft Visual C++ 2005 (XP Pro v2002 SP2) and i am getting errors (there's only a few of them) like

-- error C2146: syntax error : missing ';' before identifier 'm_iter'

-- error C2664: 'std::_Vector_iterator<_Ty,_Alloc> std::vector<_Ty>::erase(std::_Vector_iterator<_Ty,_Alloc>)' : cannot convert parameter 1 from 'CYYSType *' to 'std::_Vector_iterator<_Ty,_Alloc>'

i am not too familiar with the code -- i just launched the vcproj that came with it.  i assume the errors are only due to settings that i haven't adjust accordingly.  or they might be due to the fact that the project is being converted to Microsoft Visual C++ 2005 when i'm launching it.

the project can be downloaded using this url

can somebody please point out what i need to do to get the project to compile properly

Question by:papaflo
    LVL 48

    Accepted Solution

    ComCollection.h, line 68:

    CollType::iterator m_iter;

    Replace with:

    typename CollType::iterator m_iter;

    Author Comment

    thanks, that eliminated the first error
    i still have  a couple though
    1. on "atlcom.h", line 5005
                hr = Copy::copy(pelt, &*m_iter);
    i get this error
    Error      15      error C2664: '_CopyVariant::copy' : cannot convert parameter 2 from 'const ATL::CComVariant *' to 'VARIANT *'

    2. on "mimebody.cpp", line 824
    i get this error
    Error      22      error C2664: 'std::_Vector_iterator<_Ty,_Alloc> std::vector<_Ty>::erase(std::_Vector_iterator<_Ty,_Alloc>)' : cannot convert parameter 1 from 'CYYSType *' to 'std::_Vector_iterator<_Ty,_Alloc>'

    thanks again

    Author Comment

    hey AlexFM,

    i still have a couple of errors as mentioned above -- can you please take a look at those

    thanks again

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    What Is Threat Intelligence?

    Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

    Suggested Solutions

    Title # Comments Views Activity
    Destory  window  not working 2 124
    Need some help with Tabcontrol and Listcontrol 13 73
    L prefix in C++ 8 89
    Infragistics Ultragrid 3 54
    The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
    In Easy String Encryption Using CryptoAPI in C++ ( I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
    Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…
    In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor ( If you're interested in additional methods for monitoring bandwidt…

    794 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

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now