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'無法解析
Eclipse不包含C++編譯器和其他必要的工具。根據您的操作系統,您將需要安裝適當的工具。 –