【发布时间】:2026-01-20 15:20:05
【问题描述】:
我完全是 C++ 菜鸟,我遇到的第一个问题如下:
没有运算符 >> 匹配这些操作数
#include "pch.h"
#include <iostream>
#include <string>
using namespace std;
int main()
{
cout << "hello world!";
cin >> "hello world!";
}
【问题讨论】:
-
你希望
cin >> "hello world!";行做什么? -
哈哈,我笨。我以为你必须像 python 一样输入一个字符串,但你没有;p
标签: c++ visual-c++