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
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. how to use the vector in vc++.net 2005

how to use the vector in vc++.net 2005

Scheduled Pinned Locked Moved C / C++ / MFC
helpcsharpc++winformsgraphics
4 Posts 2 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.
  • A Offline
    A Offline
    Anamika2005
    wrote on last edited by
    #1

    hii i have created one windows forms application in vc++.net 2005 . where i want to use the vector i included #include also using namespace std; declare the vector as std::vectorvFile; int m_Number= 5 ; vFile.pushback(m_Number); i am getting the linker error like Error 1 error LNK2028: unresolved token (0A000380) "extern "C" int __cdecl _CrtDbgReportW(int,wchar_t const *,int,wchar_t const *,wchar_t const *,...)" (?_CrtDbgReportW@@$$J0YAHHPB_WH00ZZ) referenced in function "public: class std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> > & __thiscall std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> >::operator+=(int)" (??Y?$_Vector_const_iterator@UFileNames@@V?$allocator@UFileNames@@@std@@@std@@$$FQAEAAV01@H@Z) 9julyMATDOT.obj Please help me for resolving this.... Thanks in advance .... Anamika

    M 1 Reply Last reply
    0
    • A Anamika2005

      hii i have created one windows forms application in vc++.net 2005 . where i want to use the vector i included #include also using namespace std; declare the vector as std::vectorvFile; int m_Number= 5 ; vFile.pushback(m_Number); i am getting the linker error like Error 1 error LNK2028: unresolved token (0A000380) "extern "C" int __cdecl _CrtDbgReportW(int,wchar_t const *,int,wchar_t const *,wchar_t const *,...)" (?_CrtDbgReportW@@$$J0YAHHPB_WH00ZZ) referenced in function "public: class std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> > & __thiscall std::_Vector_const_iterator<struct FileNames,class std::allocator<struct FileNames> >::operator+=(int)" (??Y?$_Vector_const_iterator@UFileNames@@V?$allocator@UFileNames@@@std@@@std@@$$FQAEAAV01@H@Z) 9julyMATDOT.obj Please help me for resolving this.... Thanks in advance .... Anamika

      M Offline
      M Offline
      Matthew Faithfull
      wrote on last edited by
      #2

      That's a little bit odd. The function it can't find CrtDbgReportW is part of the C Runtime Library (various MSVCRT.dll and related bits depending on version). Check that your project is set to use it, Properties, Configuration Properties, C/C++, Code Generation, Runtime Library. Try the Multi threaded Debug /MTd option or one of the others if that gives you more/different errors.

      "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

      A 1 Reply Last reply
      0
      • M Matthew Faithfull

        That's a little bit odd. The function it can't find CrtDbgReportW is part of the C Runtime Library (various MSVCRT.dll and related bits depending on version). Check that your project is set to use it, Properties, Configuration Properties, C/C++, Code Generation, Runtime Library. Try the Multi threaded Debug /MTd option or one of the others if that gives you more/different errors.

        "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

        A Offline
        A Offline
        Anamika2005
        wrote on last edited by
        #3

        thanks for your reply.... i tried changing the runtime libary to Multi threaded Debug /MTd but of no use .....

        M 1 Reply Last reply
        0
        • A Anamika2005

          thanks for your reply.... i tried changing the runtime libary to Multi threaded Debug /MTd but of no use .....

          M Offline
          M Offline
          Matthew Faithfull
          wrote on last edited by
          #4

          In that case it looks like it might me an include path issue. I still think it odd that this STL code which is distributed as source seems to be requiring the definition of a C Runtime function that isn't part of the standard interface in order to compile. Something subtle/nasty is going on here. Are you trying to mix code from VC6 with VS2002 or later? Do you have the C Runtime source installed with your compiler (it's optional)? I'd start by checking where your build is pulling its STL and CRT header files from. Perhaps one is coming from a much later SDK and the other from a compiler installation :~

          "The secret of happiness is freedom, and the secret of freedom, courage." Thucydides (B.C. 460-400)

          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