usrbin吧 关注:310贴子:45,934

sh:pause:not found?

只看楼主收藏回复

改成PAUSE也一样


1楼2011-09-14 16:58回复
    system("pause");


    IP属地:上海2楼2011-09-14 17:00
    回复
      是啊,是运行结束后才提示的


      3楼2011-09-14 17:01
      回复

        个代码来看看


        IP属地:上海4楼2011-09-14 17:02
        回复
          #include<stdio.h>
          #include<stdlib.h>
          main()
          {
          int x,y;
          printf("please enter 2 numbers x and y:\n");
          scanf("%d%d",&x,&y);
          printf("they are \n%d\n%d\n ",x,y);
          printf("total of the numbers are %d\n",x+y);
          system("PAUSE");
          return 0;
          }
          不知道你知不知道这是在linux下运行的
          


          5楼2011-09-14 17:05
          回复
            Linux下的代码和windows下的代码不一样


            IP属地:上海6楼2011-09-14 17:05
            回复
              IP属地:上海7楼2011-09-14 17:07
              回复
                C++也是吗那我是不是要重学


                8楼2011-09-14 17:08
                回复
                  不是,是编译的是时候,例如
                  #include<iostream>
                  using namespace std;
                  int main()
                  {
                  cout<<"Hello ,world!"<<endl;
                  return 0;
                  }
                  上面的命令文件名位hello.cpp,那么编译它的命令为gcc -g -o hello.cpp


                  IP属地:上海9楼2011-09-14 17:12
                  回复
                    编译时候又怎样
                    C++的不是应该g++ -o xxx filename么
                    -g是什么用的
                    


                    10楼2011-09-14 17:14
                    回复
                      gcc是gcc编译器


                      IP属地:上海11楼2011-09-14 17:18
                      回复
                        具体你看上面那个链接吧


                        IP属地:上海12楼2011-09-14 17:19
                        回复
                          还有个事那个VC是哪里编译的找来找去都没有- -
                          是不是有个dev在vc就不能用了。。。


                          13楼2011-09-14 17:20
                          回复
                            F7


                            IP属地:上海14楼2011-09-14 17:23
                            回复
                              没有生成可执行文件


                              15楼2011-09-14 17:27
                              回复