cal*_*pto 1 c++ compiler-errors
谁能解释为什么Codeblocks会给我这些错误?:
error: ISO C++ forbids declaration of 'cout' with no type
error: invalid use of '::'
error: expected ';' before '<<' token
error: '<<x>>' cannot appear in a constant-expression // <<x>> is many different variable names
Run Code Online (Sandbox Code Playgroud)
我的代码简单如下:
#include <iostream>
#include "myclass.h"
int main(){
std::string data;
std::string e;
e = myclass().run(data);
std::cout << e << std::endl;
return 0;
}
Run Code Online (Sandbox Code Playgroud)
世界上发生了什么?
编辑:是的,我确实有iostream.抱歉没有提前把它放在那里
Kir*_*rov 11
加
#include <iostream>
Run Code Online (Sandbox Code Playgroud)
std::cout 在这个标题内
编辑:关于你的编辑 - 这意味着,问题是肯定的内部myclass.h或有一些代码,这里没有显示.
| 归档时间: |
|
| 查看次数: |
562 次 |
| 最近记录: |