Which version of ROOT are you using? and which compiler/OS? (you could also try this syntax: dir+obs.c_str())
dir+obs.c_str()