I just started learning c++ on VS code and when I tried to run a for loop, the program said that the 'for' command was not recognized. I'm sure that the code itself has nothing wrong so I'm not sure why it can't be recognized. Below is the output I obtained when I tried running the code:
for : The term 'for' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:94
+ ... \c++practice\.vscode\" ; if ($?) { g++ exponent function (for loop).c ...
+ ~~~
+ CategoryInfo : ObjectNotFound: (for:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Edit: ycong, show us the script file you are trying to run. It looks like it's running some sort of powershell command. Is the name of the file "exponent function (for loop).c"? It needs to be quoted if that's a filename. Weird filename, though.
your guess is as good as mine! I actually do have a couple of the things, lol ... I wouldn't bet on getting any answers but they are great magnifiers and suncatchers. I have a 1 inch one in a dragon's claw that is the best magnifying glass I have ever owned (or, at least the coolest?)