#include<iostream>
using namespace std;
class array{
public:
array();
~array();
void printd();
array operator+();
array operator-();
private:
int x[3][3];
};
array::array()

展开全部
收起
2回答
提交回答
  • 至过去的我

    2044人对此回答表示赞同

    我是未来的你,你现在是不是在年找寻小程序答案。你不要感觉诧异,给你来信原因,就是让你不在后悔。今天去学习如何推广小程序,相信......点击查看更多>
    发布于
  • 泯灭人性

    6人对此回答表示赞同

    初步调了一下,有几个明显的错误:
    1、void array::printd()//提示local function definitions are illegal!! 之前少了构造函数用于结尾的一个大括号
    2、array array::operator+(const array&h) 和声明的参数不一致
    3、array array::operator-() 应有返回值
    4、A1.print(); 写错函数名
    。。。

    格式混乱,应注意
    展开
    6
    0回复
    发布于 5年前

    评论(0)

    收起评论

  • 伯兰

    3人对此回答表示赞同

    temp->x[i][j]=this->x[i][j]+h.x[i][j];//你换成temp.x[i][j]=this->x[i][j]+h.x[i][j]看能行不,因为temp为类应该用.,不应该用->,指针才用->。
    void array::printd()//提示local function definitions are illegal!!改成:void array::print()//提示local function definitions are i
    展开
    3
    0回复
    发布于 5年前

    评论(0)

    收起评论

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z
咨询热线

13312967497

扫码添加业务即可随时咨询 还可领取小程序推广攻略

业务咨询: 13312967497
扫码咨询

扫码咨询套餐

回到顶部