This may be a minor question, but a solution would save me a lot of time and prevent mistakes.
I am working on a C++ project in Visual Studio. If I define a function in a class in a header file, say
void InitButton(int ButtonNum);
I usually copy and paste the signature to the cpp file. Then, I insert the class name, and replace the semi-colon with curly braces, like so:
void Button::InitButton() {
}
However, I'll often forget the class name, or accidentally type it before the return type. This also happens for any static variables I need to define in code. This seems small, but piles up since I'm at the beginning phase of a project. Is there a quicker way to auto-generate these in Visual Studio C++? Or a best practice I'm missing out on?
EDIT: It appears this has been asked before: Auto-create implementation in Visual Studio C++ 2010
EDIT 2: The best solution for me appears here: http://www.radwin.org/michael/2011/05/10/stubgen/