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. ambiguous symbol

ambiguous symbol

Scheduled Pinned Locked Moved C / C++ / MFC
c++testingbeta-testinghelp
3 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.
  • U Offline
    U Offline
    Unplugged
    wrote on last edited by
    #1

    I'm doing the following #include then later fstream fin; and it gives me this error. C:\parsells\C++ Testing\ccode\odbc_stuff\odbc_stuff.cpp(137) : error C2872: 'fstream' : ambiguous symbol there is other code in there as well, but that is where it says the error is. :wtf: ICXC NIKA

    E 1 Reply Last reply
    0
    • U Unplugged

      I'm doing the following #include then later fstream fin; and it gives me this error. C:\parsells\C++ Testing\ccode\odbc_stuff\odbc_stuff.cpp(137) : error C2872: 'fstream' : ambiguous symbol there is other code in there as well, but that is where it says the error is. :wtf: ICXC NIKA

      E Offline
      E Offline
      Ed K
      wrote on last edited by
      #2

      scope?? are you 'using namespace std?' std::fstream ed Regulation is the substitution of error for chance.

      U 1 Reply Last reply
      0
      • E Ed K

        scope?? are you 'using namespace std?' std::fstream ed Regulation is the substitution of error for chance.

        U Offline
        U Offline
        Unplugged
        wrote on last edited by
        #3

        when I put in the std:: infront of the the fstream the error changes. I wrote this code and compiled it on it's own and it all worked, now when I'm trying to merge it into some code that I downloaded it doesn't work. :confused: here's what I'm doing. std::fstream fin; fin.open(filename,ios::in | ios::nocreate); the errors I get are: odbc_stuff.cpp(30) : error C2079: 'fin' uses undefined class 'basic_fstream >' odbc_stuff.cpp(31) : error C2228: left of '.open' must have class/struct/union type odbc_stuff.cpp(31) : error C2039: 'nocreate' : is not a member of 'basic_ios >' odbc_stuff.cpp(31) : error C2065: 'nocreate' : undeclared identifier I don't get it. I thought I was doing a standard file open. :mad: ICXC NIKA

        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