开发平台(Platform): (Ex: Win10, Linux, ...)
win7
编译器(Ex: GCC, clang, VC++...)+目标环境(跟开发平台不同的话需列出)
VS2013
问题(Question):
目前使用system(str_cmd)去下PSCP指令,在确定指令正确后准备送出
出现 L"buffer is too small" && 0 的错误讯息
预送出的str_cmd指令如下:
const char* str_cmd = pscp -sftp -l A -pw B -P 22
"C:\Users\Documents\Visual Studio 2013\Projects\xxx\xxxxxx\xxxx\ffff.txt"
sftp.Kkkk.com:
有先确认从cstring转const char*与直接用cmd下是OK的,但送到system后就发生错误
我认为应该是system给带的参数限制之类的,想请问这段要怎么去避免呢?谢谢