0

enter image description here

Image is showing that when i used terminal to run the code, it wont run. code is running perfectly in output section, opened vs code after a month and shows this type of output in terminal

drescherjm
  • 10,365
  • 5
  • 44
  • 64

1 Answers1

0

You're just compiling the code, not running it. To run the code, type the following:

./exe_name.exe

..or in your case:

./tut4.exe
./tut5.exe

If you're using a mac machine, just replace .exe with .out

The Coding Fox
  • 1,488
  • 1
  • 4
  • 18
  • I answered the question just so that it can stand out and help someone who's starting out to code. – The Coding Fox Feb 27 '22 at 14:03
  • Those who started out programming should read a good book / follow a good tutorial. In that process if they genuinely find a certain problem which is not available on google / other sites (they also researched well), then they should ask on SO. – Darth-CodeX Feb 27 '22 at 14:07
  • i am new to this coding world and i am learning on my own, so when i get any error stackovrflow community is the first thing in my mind. i appreciate @SolvedGames who just helped me. – Vedant Domadiya Feb 27 '22 at 14:11
  • You probably should spend a little time googling how to use the command line and how to build code from the command line. – drescherjm Feb 27 '22 at 14:15
  • I agree with @Darth-CodeX – The Coding Fox Feb 27 '22 at 14:20
  • @VedantDomadiya Use google to find your answer, also google will refer you to stackoverflow, and those question have already been answered 10+ years ago – Darth-CodeX Feb 27 '22 at 14:21
  • For example: https://www.google.com/search?client=firefox-b-d&q=run+executable+file+in+linux – Darth-CodeX Feb 27 '22 at 14:22
  • See this SO question which is answered 10+years ago https://stackoverflow.com/q/6331075/17939455 – Darth-CodeX Feb 27 '22 at 14:23