QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3136|回复: 0

error: 'cont' was not declared in this scope

[复制链接]
发表于 2007-10-28 15:09:04 | 显示全部楼层 |阅读模式
刚学linux编程,IDE:KDevelop

程序:


  1. #ifdef HAVE_CONFIG_H
  2. #include <config.h>
  3. #endif

  4. #include <iostream>
  5. #include <cstdlib>

  6. using namespace std;

  7. int main(int argc, char *argv[])
  8. {
  9.   cout << "Hello, world!" << endl;
  10.   cont << "aa" << setw(10) << "bb";

  11.   return EXIT_SUCCESS;
  12. }

复制代码


错误:


  1. 正在编译 ex2.cpp (g++)
  2. /root/C++/Ex2/src/ex2.cpp: In function 'int main(int, char**)':
  3. /root/C++/Ex2/src/ex2.cpp:34: error: 'cont' was not declared in this scope
  4. /root/C++/Ex2/src/ex2.cpp:34: error: 'setw' was not declared in this scope
  5. make: *** [ex2.lo] 错误 1
  6. *** 退出状态:2 ***

复制代码


我已经

#include <iostream>

using namespace std;

为什么还会有这样的错误
百思不得其解。
您需要登录后才可以回帖 登录 | 注册

本版积分规则

GMT+8, 2024-11-2 00:32 , Processed in 0.040567 second(s), 16 queries .

© 2021 Powered by Discuz! X3.5.

快速回复 返回顶部 返回列表