error C2660:函数不接受 1 个参数
#include "stdafx.h"
#include<iostream>
#include<stdio.h>
class Table
{
int x;
int y;
int z;
public:
void print(int x,int y,int z);
};
void Table::print(int x,int y,int z)
{
printf("%d*%d=%d",x,y,z);
}
class Table9:public Table
{
public:
void print();
};
void Table9::print()
{
int i,j;
int x,y,z;
for(i=1;i<10;i++)
{
for(j=1;j<i+1;j++)
{
x=i;
y=j;
z=i*j;
Table::print(y,x,z);
}
print("\n");
}
}
int _tmain(int argc, _TCHAR* argv[])
{
Table9 t_9;
t_9.print();
return 0;
}
错误提示如下:
1> moni3.cpp
1>d:\workspace\软件设计\moni3\moni3\moni3.cpp(37): error C2660: “Table9::print”: 函数不接受 1 个参数
1>
1>生成失败。