If you want to get help, you should be more helpful yourself. Using a good post title is a first requirement. Just posting, "help me out", isn't going to get the right eyes to your post.
You should also provide more information about what you want to do. What is "ns2 wireless code"? Do you mean network simulator? If this is the case, a better post title would be, "Using C++ with Network Simulator". I'm not trying to be pedantic - just trying to help you get the most from LQ.
BTW, I don't know anything about network simulator.