To add a class in a Visual Studio C++ project, in Solution Explorer, right-click the project, choose Add, and then choose Class . This command opens the Add Class dialog box. When you add a class, you must specify a name that is different from classes that already exist in MFC or ATL.