Reputation: 1
I've just recently changed from MacOS/Xcode to Windows/VS so I'm a little confused on how to do some things, but I was wondering how I could create a source file with a matching header at the same time instead of doing each file separately. XCode on Mac asks if you also want to create a header with the source file but I cant seem to see that anywhere on VS.
Am using Win11 and the latest version of VS.
Upvotes: 0
Views: 2701
Reputation: 4237
Properties:Add New Item
->C++ Class
Click OK
.
Or
Create a .h file from function in cpp file:
Click the function name to highlight it.
ALT+SHIFT+F10
-> Create Declaration/Definition
Maybe there are other plugins can do it.
Upvotes: 0
Reputation: 11014
I have done it by pressing Ctrl+Shift+X when C++ project is selected in solution explorer of Visual Studio. It should open a class wizard where you can add new or modify existing C++ classes.
Upvotes: 1