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. typedef is not working properly..

typedef is not working properly..

Scheduled Pinned Locked Moved C / C++ / MFC
helptutorialquestion
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.
  • R Offline
    R Offline
    Rakesh5
    wrote on last edited by
    #1

    Hi, i am enhancing my application to support unicode characters... Following is my code snippet: --------------------------------------------------- typedef struct tagTIMEDATE { DWORD Innards[2]; } TIMEDATE; (structure being defined by Microsoft.(oledb.h)) typedef struct tagDBID { union { GUID guid; GUID *pguid; /* Empty union arm */ } uGuid; DBKIND eKind; union { LPOLESTR pwszName; ULONG ulPropid; /* Empty union arm */ } uName; } DBID; I used the following typedef now: typedef TIMEDATE DBID; ------------------------------------------ Unfortunately, Compiler throws me an error (c2371) stating DBID is redefined;different basic types.. Previously, it was working fine. its not working after making my solution unicode supporting one in the project settings.. can anyone guide me how to solve this issue? Thanks, Rakesh

    K 1 Reply Last reply
    0
    • R Rakesh5

      Hi, i am enhancing my application to support unicode characters... Following is my code snippet: --------------------------------------------------- typedef struct tagTIMEDATE { DWORD Innards[2]; } TIMEDATE; (structure being defined by Microsoft.(oledb.h)) typedef struct tagDBID { union { GUID guid; GUID *pguid; /* Empty union arm */ } uGuid; DBKIND eKind; union { LPOLESTR pwszName; ULONG ulPropid; /* Empty union arm */ } uName; } DBID; I used the following typedef now: typedef TIMEDATE DBID; ------------------------------------------ Unfortunately, Compiler throws me an error (c2371) stating DBID is redefined;different basic types.. Previously, it was working fine. its not working after making my solution unicode supporting one in the project settings.. can anyone guide me how to solve this issue? Thanks, Rakesh

      K Offline
      K Offline
      KarstenK
      wrote on last edited by
      #2

      TIMEDATE and DBID are reserved datetype so you cant use DBID. Make typedef TIMEDATE MY_DBID;

      Press F1 for help or google it. Greetings from Germany

      R 1 Reply Last reply
      0
      • K KarstenK

        TIMEDATE and DBID are reserved datetype so you cant use DBID. Make typedef TIMEDATE MY_DBID;

        Press F1 for help or google it. Greetings from Germany

        R Offline
        R Offline
        Rakesh5
        wrote on last edited by
        #3

        Hi, Karsten But previously, it was working fine... in the sense, before converting my project settings to unicode... If so, why is it not working now?

        K 1 Reply Last reply
        0
        • R Rakesh5

          Hi, Karsten But previously, it was working fine... in the sense, before converting my project settings to unicode... If so, why is it not working now?

          K Offline
          K Offline
          KarstenK
          wrote on last edited by
          #4

          this looks like some type changing in the string section.:~ or you can use #undef DBID :~ this are all no good solutions... :((

          Press F1 for help or google it. Greetings from Germany

          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