0
0 Comments

PS E:\MyCProgrammes> cd “e:\” ; if ($?) { gcc VS1.1_programme.c -o VS1.1_programme } ; if ($?) { .\VS1.1_programme }
PS E:\>

I still unable to run my C code that requires input from the user after installing the 2 extensions listed (C/C++ by Microsoft and Code runner by Jun Han) and checking “Code Runner: Run in Terminal”. The above is the prompt given whenever I run my C code despite whether it requires input for now.

I initially get to run C code that does not require inputs when I put my
C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code\bin
and
C:\MinGW\bin
under the path of my “User Variables for Admin” in the “Advanced system settings”.

However, as I could not run C code that requires input, I removed
C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code\bin
and
C:\MinGW\bin
from the path of my “User Variables for Admin” (I tried Ctrl+X and clicking the “delete” button shown) and added them to the path of my “System Variables”,
it starts to give me the prompt:
PS E:\MyCProgrammes> cd “e:\” ; if ($?) { gcc VS1.1_programme.c -o VS1.1_programme } ; if ($?) { .\VS1.1_programme }
PS E:\>

I still couldn’t run C code after adding
C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code\bin
and
C:\MinGW\bin
back to the path of my “User Variables for Admin” and removing them from the path of my “System Variables”.

For every changes made, I did close my Visual Studio Code and open it to try again. (I tried moving C:\Users\ADMIN\AppData\Local\Programs\Microsoft VS Code\bin
and
C:\MinGW\bin
quite a number of times in different approaches in between the path of “User Variables for Admin” and “System Variables” in the “Advanced system settings”

Please help. Thanks a gazillion. Have a nice day.

Elaine Asked question April 2, 2023
Add a Comment