2015-04-30 57 views
0

我刚刚安装了Eclipse C++,并想测试一些程序,我复制了一个随机代码并将其命名为main.cpp,并运行它并传入拥有14个错误Eclipse C++错误“....无法解决”

代码:

#include<iostream> 
#include<cmath> 

using namespace std; 

int main() { 
    int i,j,m,n,l; 
    float x[10],a[10][10],b[10],c[10]; 
    cout<<"\nEnter the value of n : \n"; 
    cin>>n; 
    cout<<"\nEnter the number of iterations : \n"; 
    cin>>l; 
    cout<<"\nEnter the right hand side constants : \n"; 
    for(i=0;i<n;i++) { 
     cin>>b[i]; 
    } 
    cout<<"\nEnter the coefficients row wise : \n"; 
    for(i=0;i<n;i++) { 
     x[i]=0; 
     for(j=0;j<n;j++) { 
      cin>>a[i][j]; 
     } 
    } 
    m=1; 
    line: 
    for(i=0;i<n;i++) { 
     c[i]=b[i]; 
     for(j=0;j<n;j++) { 
      if(i!=j) { 
       c[i]=c[i]-a[i][j]*x[j]; 
      } 
     } 
    } 
    for(i=0;i<n;i++) { 
     x[i]=c[i]/a[i][i]; 
    } 
    m++; 
    if(m<=l) { 
     goto line; 
    } 
    else { 
     cout<<"\nThe Solution is : \n"; 
     for(i=0;i<n;i++) { 
      cout<<"\nx("<<i<<") = "<<x[i]<<"\n"; 
     } 
    } 
} 

错误: 计划 “G ++” 不是在PATH 计划 “海湾合作委员会” 发现不PATH 程序中发现 “制造”,也不在路径发现 符号“ cin'无法解析 符号'std'无法解析

+0

Eclipse不包含C++编译器和其他必要的工具。根据您的操作系统,您将需要安装适当的工具。 –

回答