-1

In VC++ 2017, is there a quick way of typing the member function declaration in the header file, and then it automatically builds the required body for you in the .cpp file?

For example, typing

void show();

in Vector2.h, can create the body

void show() { }; 

in the Vector2.cpp file with some keyboard shortcut.

Bob
  • 327
  • 3
  • 12
  • Possible duplicate of [Fast way to generate code functions from header functions in Visual Studio?](https://stackoverflow.com/questions/17961648/fast-way-to-generate-code-functions-from-header-functions-in-visual-studio) – krisz Jun 19 '18 at 01:31

1 Answers1

1

When you type void show(); in the header, if there isn't already an implementation you should see a green underline under the declaration. Put your cursor on that line and press ctrl + . to open up the list of suggested actions, and then enter to choose the first, which should create the empty implementation as desired.

wcroughan
  • 76
  • 1
  • 10