title: How do I make a class module with one or more functions in Visual C++ 2008 Managed
body: <p>I am an absolute novice in Visual C++ and hence I have to ask you, how would I create a managed class module (new class) with one or more functions inside of my managed C++ project (Visual Studio 2008)?
  How would I call the method of the class for example if a button was pressed. I was unable to understand the very complicated tutorials on it and most of the tutorials referring to unmanaged code or older versions of visual studio. My own attempt totally failed and produced only errors, since I found no right options on how I would add a new class file to my Visual C++ managed project. If I choose a new "CLR Component Class" I get a warning message telling me about components filling the right pane of my screen. If I choose a new "CLR Windows Form Class" it happens just nothing, no file with the extension ".class" would be added or I do not know the file which was newly added. I just need a very basic class file with one public function in it which I would be able to call from any location of my project.</p>
  
  <p>I have a very big main() cpp-file already (main.cpp) with lots of functions in it.
  There are about thousand functions or more, so it becomes difficult to search or scroll.
  Now I would like to put some of these 1000 functions in a second cpp-file within my current project (in Visual Basic 6 it was simply called a 'new module' in CSharp it is called a 'new class file').
  The problem is, that I can't call this functions in Visual C++, once I have moved them out of my
  main.cpp to module1.cpp for example.</p>
  
  <p>That's what I don't want:</p>
  
  <ul>
  <li>a DLL</li>
  <li>a second project</li>
  <li>adding a reference to something (in project/references)</li>
  <li>double declarations</li>
  </ul>
  
  <p>I know there is a way to make just a simple class and then create a new object of this class to use its methods. That's what I want. The examples in Google on this did not work for me, because they were for earlier versions of visual studio and not compatible with my version. From this examples I know what I want, but I haven't got the knowledge to implement it in Visual Studio 2008.</p>