Go to https://snippet-generator.app/
Type/Paste the default code you want to use the snippet for. Enter the trigger and description.
Copy the generated snippet onto clipboard.
Head to VSC. Press ctr + shift + p .Type configure user snippets. 5.Select your desired language(C++ in your case).
Replace the comments with the snippet in your clipboard.
Save and exit. Now try to type the trigger text. You will see the snippet ready!