你能帮助我吗?
包括用C STL头文件++如<string>
,<stack>
,<bits/stdc++.h>
等没有给出任何输出。但是<iostream>
工作正常。
因为<string>
我也尝试std::string
过声明。
我已经C:\MinGW\bin
走了。
#include <iostream>
#include <string>
using namespace std;
int main()
{
std::string str = "hello";
// string str = "hi";
cout << str;
}
我的堆栈程序看起来像
#include <iostream>
#include <stack>
using namespace std;
int main()
{
stack<int> s;
s.push(5);
cout << s.top();
}
我已经检查了我的g ++版本
g++ --version
g++.exe (MinGW.org GCC-6.3.0-1) 6.3.0
Copyright (C) 2016 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
在这两种情况下,我的PowerShell都是这样的(powershell在之后不做任何事情./hello.exe
):
我)寻找libstdc++-6.dll
位于路径C:\MinGW\bin
。
II)将其复制并粘贴到可执行目录(即hello.exe
位置)中。
III)现在执行它。
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句