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
M

miropl

@miropl
About
Posts
2
Topics
0
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • map erase issue
    M miropl

    Yes, char* is difficult to manipulate, but char* also is a pointer to null terminated string - the basic C/C++ strings primitive type (well know "C" string). A little modification of "The problem is that what's being used as a key are pointers to chars". No the key are pointers to null terminated strings. Now let's see the code. typedef map STRING2INT; // Thank's Mike m["January"]=1; string str="January"; // cout< 012345678901 the next (12) byte is '\0' // |||||||||||| char somearr[] ="MonthJanuary"; char* psomearr = &somearr[5]; // lets take the address of the fifth byte char** ppkey = &psomearr; // let's try indirect cout<. Best regards, Miro

    ATL / WTL / STL help tutorial question

  • map erase issue
    M miropl

    ... and just one line more. typedef map< char*, int > STRING2INT; instead typedef map STRING2INT; // it's never going to work Miro

    ATL / WTL / STL help tutorial question
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups