I'm a complete newbie to coding, so I don't understand most of the similar posts on this forum.
I'm doing a simple C programming course, and I need to run a notepad++ file from the Powershell. The file only contains this:
#include <stdio.h>
int main()
{
int num = 931;
printf("The number 'num' is %d\n", num);
return 0;
}
I called the file: Variables.c then I put this into the Powershell:
PS C:\Users\Raven\Desktop\C Programming> gcc Variables.c -o Variables.exe
Followed by:
PS C:\Users\Raven\Desktop\C Programming> Variables.exe
I then get the following error:
Variables.exe : The term 'Variables.exe' is not recognized as the name of a cmdlet, funct ion, script file, or operable program. Check the spelling of the name, or if a path was i ncluded, verify that the path is correct and try again. At line:1 char:1
+ Variables.exe
+ ~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (Variables.exe:String) [], CommandNotFound Exception
+ FullyQualifiedErrorId : CommandNotFoundException
What is going on here??
Many thanks in advance!
gccto be sure that it actually compiled the code? Does executingdirin the powershell prompt to list the contents of the directory include a file called Variables.exe?