当我右键单击“运行代码”,并在用户设置中的终端中运行时,我收到这些错误。
At line:1 char:63
+ ... "c:\Users\Josh\Documents\Programming\Learning to Program\" && g++ Exe ...
+ ~~
The token '&&' is not a valid statement separator in this version.
At line:1 char:99
+ ... \Learning to Program\" && g++ Exercise36.cpp -o Exercise36 && "c:\Use ...
+ ~~
The token '&&' is not a valid statement separator in this version.
At line:1 char:102
+ ... ercise36 && "c:\Users\Josh\Documents\Programming\Learning to Program\ ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expressions are only allowed as the first element of a pipeline.
At line:1 char:160
+ ... "c:\Users\Josh\Documents\Programming\Learning to Program\"Exercise36
+ ~~~~~~~~~~
Unexpected token 'Exercise36' in expression or statement.
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullyQualifiedErrorId : InvalidEndOfLine
直到今天我一直编译得很好,我做了一些谷歌搜索并开始在终端中输入我自己的命令,而不仅仅是运行代码。
我开始更换&&
with -and
并得到一个不同的问题。这就是命令现在的样子。
"c:\Users\Josh\Documents\Programming\Learning to Program\" -and g++ Exercise36.cpp -o Exercise36 -and "c:\Users\Josh\Documents\Programming\Learning to Program\"Exercise36
这是我得到的错误。
Set-Location : Parameter cannot be processed because the parameter name 'o' is ambiguous. Possible matches include: -OutVariable -OutBuffer.
At line:1 char:87
+ ... \Programming\Learning to Program\" -and g++ Exercise36.cpp -o Exercis ...
+ ~~
+ CategoryInfo : InvalidArgument: (:) [Set-Location], ParameterBindingException
+ FullyQualifiedErrorId : AmbiguousParameter,Microsoft.PowerShell.Commands.SetLocationCommand
我正在使用 GNU 开源编译器,这是我在编译时遇到的第一个问题,因为我意识到在编译之前必须保存。我正在运行一个简单的字符串,它将从 C++ Primer 程序从终端读取的字符串中的所有字符更改为 X。任何帮助,将不胜感激。
我有同样的问题
PS:
C:\typescript_practice> tsc testclass.ts && node testclass.js
行:1 字符:18
tsc testclass.ts && 节点 testclass.js
~~
在此版本中,标记“&&”不是有效的语句分隔符。
+ CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
+ FullQualifiedErrorId : InvalidEndOfLine
PS C:\typescript_practice> tsc testclass.ts | PS C:\typescript_practice> tsc testclass.ts |节点测试类.js
桑加梅什·瓦斯特拉德
与下面一起工作
use |
代替&&
最新的节点
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)