I m not able to execute my code in power shell. i wrote " ./simple_interest " as my file name but its not executing. Also, when i m press Ctrl+B , it gives a message that “g++ is not a recognised as an internal or external command” , although after it it comes "finished [0.4 sec] " . Plz help
Problem in executing code
@himanshigupta579 I think you forgot to mark the mingw-gcc-g++ package in the MinGW Installation Manager.
Run the MinGW Installation Manager again and mark mingw-gcc-g++ for installation and press Apply Changes
@himanshigupta579 also you can try this one if still get error after using above method:
You have to modify environment variables. Do the following:
From the desktop, right-click Computer and click Properties.
From the Computer Properties window, click Change Settings
In the System Properties window which opens up, click on the Advanced tab.
In the Advanced section, click the Environment Variables button.
Finally, in the Environment Variables window (as shown below), highlight the Path variable in the Systems Variable section and click the Edit button. Add or modify the path lines with the paths you wish the computer to access. Each different directory is separated with a semicolon as shown below.
C:\Program Files;C:\Winnt;C:\Winnt\System32
Hope you get it.Feel free to ask any doubt.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.
i tried as you said . i installed mingw package again but still the code gives the same error on executing it.
Have you tried changing the ownership of your file.
Try:
chmod +x filename
in terminal to make it an executable file.
I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.
On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.