'for' not recognized

Feb 3, 2021 at 4:20pm
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

Thanks everyone in advance.
Feb 3, 2021 at 4:29pm
Posting your code here would go a long way to helping us to help you. Posting the error alone isn't all that helpful.

Our crystal balls are not working this week.
Feb 3, 2021 at 4:43pm
for requires () on it.
for( ... stuff ..)


Feb 3, 2021 at 5:53pm
jonnin, do you have any spare crystal balls? :)

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.
Last edited on Feb 3, 2021 at 7:09pm
Feb 3, 2021 at 9:28pm
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?)
Last edited on Feb 3, 2021 at 9:29pm
Topic archived. No new replies allowed.