Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>C/C++ Auto TemplateNew to Visual Studio Code? Get it now.
C/C++ Auto Template

C/C++ Auto Template

nhatnam7kz

|
751 installs
| (7) | Free
Automatically inserts a C/C++ template when creating or opening an empty .c/.cpp file.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

C/C++ Auto Template

Demo

Automatically inserts a basic C/C++ template when you create/open an empty .c or .cpp file.


✨ Features

✅ Auto template for .c
✅ Auto template for .cpp
✅ Only inserts when file is empty (won't overwrite your code)


⚙️ Custom Library Selection (NEW)

You can choose which libraries to include directly from VS Code Settings.

How to configure

  1. Open Settings (Ctrl + ,)
  2. Search for: C/C++ Auto Template
  3. Select libraries for:
    • C Libraries
    • C++ Libraries

Library Selection


🚀 Usage

  1. Create a new empty file main.c or main.cpp
  2. Template will be inserted automatically

📌 Example output

main.c

#include <stdio.h>
#include <math.h>

int main() {
    return 0;
}

🧠 Note: This is a personal project, fully generated with AI and refined by the author.

⭐ If this extension saves you time, please consider leaving a 5-star review. It really helps!

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft