如果你学习C 请不要选择DevCpp

分享一下我老师大神的人工智能教程!零基础,通俗易懂!http://blog.csdn.net/jiangjunshow

也欢迎大家转载本篇文章。分享知识,造福人民,实现我们中华民族伟大复兴!

               

作者:朱金灿
来源:http://blog.csdn.net/clever101/


      有网友发信给我,说使用DevCpp编译一个MTL库的测试程序出现一堆莫名其妙的错误。


      DevCpp我听说过,以前也下载使用过,据说号称Windows平台下的gcc。结果我用DevCpp一编译网友的程序,感觉此编译器不堪大用。


      网友的测试程序是这样的:

  1. #include <iostream>  
  2. #include <boost/numeric/mtl/mtl.hpp>  
  3. int main(int argc, char* argv[])  
  4. {  
  5.     using namespace mtl;  
  6.     // Define dense vector of doubles with 10 elements all set to 0.0.  
  7.     dense_vector<double>   v(10, 0.0);  
  8.     // Set element 7 to 3.0.  
  9.     v[7]= 3.0;  
  10.     std::cout << "v is " << v << "/n";  
  11.     return 0;  
  12. }  
#include <iostream>#include <boost/numeric/mtl/mtl.hpp>int main(int argc, char* argv[]){    using namespace mtl;    // Define dense vector of doubles with 10 elements all set to 0.0.    dense_vector<double>   v(10, 0.0);    // Set element 7 to 3.0.    v[7]= 3.0;    std::cout << "v is " << v << "/n";    return 0;} 


        结果出现莫名其妙的错误,说实话它的编译错误提示极为晦涩,我基本看不懂,只好以图为证:

Dev%20Cpp%20Compiler%20Error



     但是我用VS 2008 + sp1编译这个程序,则一点问题都没有。看看网友怎么评论DevCpp的吧:


        Get rid of Dev-C++ and download VC++ 2008 Express.  If you have any difficulties after that, let us know.
Dev-C++ has not been supported by its creators for a long time.  It is horribly out of date.  You might be able to just update your version of the compiler and keep the IDE as-is, but you get a really good debugger integrated with VC++ 2008 Express that really blows the competition away.


评论来自:
http://bbs.prog365.com/c-programming-on-using-mtl-matrix-template-library-in-dev-c-4.9.8.0-190-1-1.html


           所以在Windows平台下学习C++,我建议你选择VS 2005及更高版本的VS,或者选择开源的CodeBlocks。







           

给我老师的人工智能教程打call!http://blog.csdn.net/jiangjunshow
这里写图片描述
  • 3
    点赞
  • 4
    收藏
    觉得还不错? 一键收藏
  • 7
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 7
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值