Reputation: 29
I use g++ --std=c++17 sol.cpp
very frequently so I want to make this as default. To do this I have gone through many of the answers here but none of them are working in my system.
I have tried alias,
alias g++='g++ --std=c++17'
in my .bash_profile
but it is not working.
Please help me with this for which I will be thankful to you. Thank You
Upvotes: 1
Views: 637
Reputation: 38784
Apple changed shell from bash to zsh due to licensing concerns. Therefore configuration files are now .zshrc and .zprofile.
Add alias to ~/.zshrc
alias g++='g++ -std=c++17'
Don't forget to restart Terminal.
Upvotes: 3