Issue
[location of g++/GCC installed through by Homebrew[][1]][1]
[1]: https://i.stack.imgur.com/Njug0.jpg
navinkarunanithi@Navins-MacBook-Pro bin % rm g++
rm: g++: Permission denied
navinkarunanithi@Navins-MacBook-Pro bin % rm g++
rm: g++: Permission denied
navinkarunanithi@Navins-MacBook-Pro bin % ln -s g++-11 g++
ln: g++: File exists
navinkarunanithi@Navins-MacBook-Pro bin % g++
clang: error: no input files
navinkarunanithi@Navins-MacBook-Pro bin %
I have been trying linking gcc on m1 mbp but I have tried and failed . gcc/g++ are in the same location as clang and I don't know how to override them . please help!
Solution
so after a long time of searching I found a blog and now I was able to change it
https://codeforces.com/blog/entry/88063
so if you have installed g++ and gcc via home-brew you can use this command
sudo ln -s /opt/homebrew/bin/g++-10 /usr/local/bin/
Answered By - kid code