-
Create
main.cpp
and fill it with this source:#include <iostream> using namespace std; // Consegna int main() { // Dichiarazione delle variabili // Input // Logica del programma // Output system("PAUSE"); }
-
Now we need to create a
$profile
forPowerShell
md C:\Users\yourUser\Documents\WindowsPowerShell cd C:\Users\yourUser\Documents\WindowsPowerShell type nul > Microsoft.PowerShell_profile.ps1
-
Open
Microsoft.PowerShell_profile.ps1
and type this source:function Copy-CppFile { param ( [string]$SourcePath = "ABSOLUTE PATH OF TEMPLATE.CPP" ) Copy-Item -Path $SourcePath -Destination .\ } Set-Alias -Name templatecpp -Value Copy-CppFile
-
If now by writing $profile in powershell you get a path, you're done!
-
If your powershell gives strange errors, run this command:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
-
Notifications
You must be signed in to change notification settings - Fork 0
b3nj4m1no/templatecpp
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
About
fancy template alias for c++ ପ(๑•ᴗ•๑)ଓ ♡
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published