ok here I am stuck, I want to create a game server in C++ that can communicate with unity and such. But I have no idea how to do that nor how to create a server in xcode or visual studio or the linux version. I have windows 7 mac os x 10.5.6 and a linux ubunto (all 64 bit). I can make the server on either platform. I just need to know how to do it. I know C++ but have never dealt with networking for 3 years so I forgot all of it (networking in C++ not C++)
Start reading about networking. The only way to communicate with unity from a c++ server is through sockets. You write your messages in the socket, and read them at the other side.
Actually, it should be possible to have a C++-based game server if you're using Raknet which is the library that Unity also uses. If you search the term Raknet on the forums, you'll find quite a bit of useful information on this. So, there's probably no need to directly use sockets. But I'd also recommend reading about networking and starting with very simple testcases - don't underestimate the complexities involved ;-)
is there an example some where of that? or do you have one? because I have no idea what I am doing after reading the posts and everything.
Depending on your needs you may find that some other tools out there accelerate your project. Take a look at SmartFoxServer for instance. You may not want to start from scratch as that's a fairly big endeavor.
Then you are out of luck at least with unity's networking There is no available dedicated server for Unity, you need to write your own basing on RakNet and the known Ids
That's why we recommended reading up on game networking ... it's a really big field. One route you could probably follow is learning to use Raknet, maybe create a little game using it ... just enough to feel really comfortable with Raknet. From there, you'll probably feel much better with the given posts here ... and be able to ask specific questions. Just don't assume that this is something you could learn within a week or two. You might even have to do some packet sniffing of a little Unity game you create yourself to get a bit of a better feeling for what's going on. Or take the route via SmartFoxServer as others have recommended. I know that Thomas has created some really nice stuff, including tutorials and examples. See for example: http://forum.unity3d.com/viewtopic.php?t=19770 (and do a forum search for SmartFoxServer).