| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1779 人关注过本帖
标题:eclipse软件中遇到的问题
只看楼主 加入收藏
aihehaitang
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2013-5-26
收藏
 问题点数:0 回复次数:0 
eclipse软件中遇到的问题
我用的eclipse编译的C++,我在project下运行完一个文件,在运行另一个,总是出现下面的问题:提示红色括号出错!
如果重新建立一个文件夹,则可以运行。
求大神指教!!!!!

#include <iostream>
const double litre=0.264179;   //1公升=0.264179加仑
double ave(double n_litre,double distance);
int main()
{
    using namespace std;
    double a1,b1,c1,a2,b2,c2;
    char d;
    do
    {
        cout << "input two car's litre of oil:" <<endl;
        cin >> a1,a2;
        cout << "input two car's distance:" <<endl;
        cin >> b1,b2;
        c1=ave(a1,b1);
        c2=ave(a2,b2);
        cout.setf(ios::fixed);
        cout.setf(ios::showpoint);
        cout.precision(2);
        cout <<c1<<endl;
        cout <<c2<<endl;
        if(c1>c2)
            cout << "the first car is good." << endl;
        else if(c1==c2)
            cout << "the two car has the same level."<<endl;
        else if(c1<c2)
            cout << "the second car is good." << endl;
        cout << "if you want comulate another input 'y';"
            " end of program intput 'n'."<<endl;
        cin >> d;
    }while((d=='y')||(d=='Y'));
    cout << "end."<<endl;
    return 0;
}
double ave(double n_litre,double distrance)
{
    return(distrance/(litre*n_litre));
}
搜索更多相关主题的帖子: double include distance eclipse 
2013-05-26 18:35
快速回复:eclipse软件中遇到的问题
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.015228 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved