I know you can’t add a class called “Socket” in VS2010 by doing:
- Right click on project
- Add -> Class
- C++ Class -> Add
- Type “Socket” as Class name and hit finish
You get:
'Socket' is a reserved class name
So instead I’ve tried adding a class called “Socket1”, removed all the occurrences of “1” and VS seems to compile without any errors. Will this cause any conflict? Or is using namespaces a proper way to work around the above error?
You should probably just namespace it (and everything else you’re writing for that matter), forcing your way around the compiler is a bad idea.