Eclipse C ++在Windows命令提示符下运行

时间:2015-07-01 13:54:33

标签: c++ eclipse

我写了一个简单的C ++代码。当我在Eclipse上单击“运行”时,首先会出现一个带有我的程序的Windows命令提示符。执行后,Eclipse控制台开始工作。有没有办法停用命令提示符并只使用Eclipse控制台?

   #include <iostream>


int main(){
    int x = 0,y = 0;
    std::cout <<"type2 numbers and I will make a magic trick."<< std::endl;

    std::cin >> x >> y;

    std::cout<<"Ta daa "<<x<<" and "<<y<<" equals to "<<x+y<<std::endl;


    return 0;
}

当我擦除std:cin part时,命令提示符出现并且消失不到一秒钟,所以我想每次运行我的代码时,都会出现此命令提示符。

0 个答案:

没有答案
相关问题