把C++的三元组转制代码转换成C语言的!

[复制链接]
查看11 | 回复4 | 2012-4-19 09:36:58 | 显示全部楼层 |阅读模式
已改好了,楼主拿好,记得给分啊#include struct matrix{ int data[100][100]; int m,n;};typedef int spmatrix[100][3];void Init(matrix& mx);//稀疏矩阵初始化void SpmDisplay(spmatrix spm);//显示三元组表示的矩阵void Compressmatrix(matrix A,spmatrix B);//将稀疏矩阵转换为三元组矩阵void Transpmatrix(spmatrix B,spmatrix& C);//将三元组矩阵转置int main()...
回复

使用道具 举报

千问 | 2012-4-19 09:36:58 | 显示全部楼层
这个所谓的C++代码其实和C代码也没多大区别了。只要把namespace去掉,class改struct,把引用改指针,把cin、cout换scanf和printf就完事了。...
回复

使用道具 举报

千问 | 2012-4-19 09:36:58 | 显示全部楼层
楼上的很好...
回复

使用道具 举报

千问 | 2012-4-19 09:36:58 | 显示全部楼层
顶了...
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行