XCode is amazing for C/C++ development, but Emacs is just better as a text editor. The rtags project [1] is under active development right now to have more IDE-like features in Emacs for C/C++ developers. There are some other projects, for example clang-complete-async [2]