Hello! I want to create in my project class "Screen", "Graphics", "Font" and "Environment", but when I type these names and hit enter I get message: "Screen" is reserved class name or "Environment" is reserved class name. I don't want to make CScreen or ScreenC or something like that :/ I have Visual Stuido 2010. Is there any way to fix this ?
You either need to completely not #include
these classes into your project or make a namespace for your classes and then use that namespace when you need to resolve.
If you want other programmers to use your code, they might get confused that you are reusing names of classes that they already know, so it would be better to come up with a prefix for your classes, perhaps signifying the project name.
What do you mean by "I type these names and hit enter"? Is this Class Wizard message? In this case just create h and cpp files manually. I don't know any C++ feature that doesn't allow to use these names for a class. Of course, in the case of name collision, use namespace.
I find solution: I can add separately Graphics.cpp and Graphics.h, Environment.cpp and .. etc :/ But I still don't know why I can't use "add class" :/