即使我从未调用过函数'Bike::Bike(Bike *)',是什么导致了错误?
错误:找不到“Bike::Bike(Bike *)”的匹配项
#include<iostream.h>
#include<conio.h>
class Bike
{
Bike()
{
cout<<"\nIn Bike const.";
}
public: static Bike * getBike();
};
Bike * Bike :: getBike()
{
cout<<"\nIn getBike";
return new Bike();
}
void main()
{
Bike b = Bike::getBike();
}