error: 'cont' was not declared in this scope
刚学linux编程,IDE:KDevelop程序:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <iostream>
#include <cstdlib>
using namespace std;
int main(int argc, char *argv[])
{
cout << "Hello, world!" << endl;
cont << "aa" << setw(10) << "bb";
return EXIT_SUCCESS;
}
错误:
正在编译 ex2.cpp (g++)
/root/C++/Ex2/src/ex2.cpp: In function 'int main(int, char**)':
/root/C++/Ex2/src/ex2.cpp:34: error: 'cont' was not declared in this scope
/root/C++/Ex2/src/ex2.cpp:34: error: 'setw' was not declared in this scope
make: *** 错误 1
*** 退出状态:2 ***
我已经
#include <iostream>
using namespace std;
为什么还会有这样的错误
百思不得其解。
页:
[1]