#include<iostream>
#include<iomanip>
#include<string>
class Pizza{
public:
std::string type;
std::string size;
int toppings;
Pizza(){}
void setType(std::string type){
type = type;
}
std::string getType(){
return type;
}
void setSize(std::string size){
size = size;
}
std::string getSize(){
return size;
}
void outputDescription(){
//cout<<"A " cout<<getType(); cout<<" pizza;
}
};
int main(){
Pizza large = new Pizza();
large.setType("pan");
large.setSize("large");
return 0;
}
In visual studio, I get this error: error C2440: 'initializing' : cannot convert from 'Pizza *' to 'Pizza. What is causing the problem?