'for' not recognized

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.
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.
for requires () on it.
for( ... stuff ..)


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
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
Topic archived. No new replies allowed.