主题:请求指导:INTERNAL COMPILER ERROR
#include<iostream>
using namespace std;
template<class T>
struct element
{
int row,col;
T item;
};
const int MaxTerm=10;
struct SparseMatrix
{
element data[MaxTerm];
int mu,nu,tu;
};
void Trans2(SparseMatrix A, SparseMarix &B)
{
B.mu=A.nu;B.nu=A.mu;B.tu=A.tu;
if(B.tu>0)
{
for(i=0;i<A.nu;i++)
num[i]=0;
for(i=0;i<A.nu;i++)
j=A.data[i].col;
num[j]++;
}
copt[0]=0;
for(i=1;i<A.nu;i++)
copt[i]=copt[i-1]+num[i-1];
for(i=0;i<A.tu;i++);
{
j=A.data[i].col;
k=copt[j];
B.data[k].row=A.data[i].col;
B.data[k].col=A.data[i].row;
B.data[k].item=A.data[i].item;
copt[j]++;
}
}
}
检测可知:
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1.cpp
E:\Microsoft Visual Studio\MyProjects\Lsing\1.cpp(12) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
执行 cl.exe 时出错.
请问需要怎么修改??
using namespace std;
template<class T>
struct element
{
int row,col;
T item;
};
const int MaxTerm=10;
struct SparseMatrix
{
element data[MaxTerm];
int mu,nu,tu;
};
void Trans2(SparseMatrix A, SparseMarix &B)
{
B.mu=A.nu;B.nu=A.mu;B.tu=A.tu;
if(B.tu>0)
{
for(i=0;i<A.nu;i++)
num[i]=0;
for(i=0;i<A.nu;i++)
j=A.data[i].col;
num[j]++;
}
copt[0]=0;
for(i=1;i<A.nu;i++)
copt[i]=copt[i-1]+num[i-1];
for(i=0;i<A.tu;i++);
{
j=A.data[i].col;
k=copt[j];
B.data[k].row=A.data[i].col;
B.data[k].col=A.data[i].row;
B.data[k].item=A.data[i].item;
copt[j]++;
}
}
}
检测可知:
--------------------Configuration: 1 - Win32 Debug--------------------
Compiling...
1.cpp
E:\Microsoft Visual Studio\MyProjects\Lsing\1.cpp(12) : fatal error C1001: INTERNAL COMPILER ERROR
(compiler file 'msc1.cpp', line 1786)
Please choose the Technical Support command on the Visual C++
Help menu, or open the Technical Support help file for more information
执行 cl.exe 时出错.
请问需要怎么修改??