|

楼主 |
发表于 2023-3-31 15:43:12
|
显示全部楼层
错误 C2065:“cout\":未声明的标识符 | WP2
https://www.wp2.cn/other/%e9%94%99%e8%af%af-c2065cout%e6%9c%aa%e5%a3%b0%e6%98%8e%e7%9a%84%e6%a0%87%e8%af%86%e7%ac%a6/
- #include "stdafx.h" //必须是第一行
- #include <iostream>
- #include <cstdio>
- using namespace std;
- int main()
- {
- int c, i = 0;
- char str[100];
- cout << "Enter characters, Press Enter to stop\n";
- do
- {
- c = getchar();
- str[i] = c;
- i++;
- } while (c != '\n');
- cout << "你输入的文字是:" << str;
- std::getchar();
- return 0;
- }
复制代码 |
|