我想初始化一个带有特殊字符的向量,然后打印它
这是我使用的代码
#include <vector>
using namespace std;
int main()
{
std::vector<char> p { *,*,*,*,*,*,* };
for( std::vector<char>::const_iterator i = p.begin(); i != p.end(); ++i)
std::cout << *i << ' ';
}
Run Code Online (Sandbox Code Playgroud)
我知道我错过了什么,但只是无法弄清楚是什么.我会很感激一些建议