精英盒子 -> 生活 -> 哈哈 我成功了 [打印本页]

outman 2011-10-06 16:59

哈哈 我成功了

今天第一次用c++写了一个程序 召唤各位围观
  1. include("iostream")
    #using namespace std
    char* mian(){
    std::cout<'哈哈 我的第一个C++程序!'>
    return "0"
    };



jybox 2011-10-06 17:41
你是故意的

jybox 2011-10-06 17:41
  1. main.cpp:2:2: error: invalid preprocessing directive #using
    main.cpp:4:11: warning: character constant too long for its type
    main.cpp:1:8: error: expected constructor, destructor, or type conversion before ‘(’ token



whtsky 2011-10-06 18:57

whtsky 2011-10-06 18:58
LZ C语言不适合你。。。

whtsky 2011-10-06 18:58
去学汇编吧

whtsky 2011-10-06 18:59
jybox:main.cpp:2:2: error: invalid preprocessing directive #using
main.cpp:4:11: warning: character constant too long for its type
main.cpp:1:8: error: expected constructor, destructor, or type conversion before ‘(’ token
 (2011-10-06 17:41) 

这种明显错误的代码你竟然还编译

outman 2011-10-06 20:39

pcliker 2011-10-06 20:41

编程土豆 2011-10-07 15:13

char main()??!!

scxyscxy 2011-10-07 15:15
也有C++念头。。。

outman 2011-10-07 15:28
编程土豆:[表情]  [表情]
char main()??!! (2011-10-07 15:13) 

是char* mian()
看题要细心

whtsky 2011-10-07 20:35
编程土豆:[表情]  [表情]
char main()??!! (2011-10-07 15:13) 

全程无分号

whtsky 2012-01-24 22:29
dandadiqiu:[表情] LZ不是高手么?。。。这是故意的吧。。。
(我是故意挖坟来的) (2012-01-24 22:02) 

好想有扣分权限




Powered by phpwind v8.7 Code ©2003-2011 phpwind
Time 0.051694 second(s),query:5 Gzip enabled