mardi 14 avril 2015

C++: No match for operator == / search for a string and


Vote count:

0




Currently receiving an error:



Operator== in((ResturantOrder*)this)->ResturantOrder::[i]==a'



Snippet of my code:



void RestaurantOrder ::AddToOrder(RestaurantMenu obj, string s)
{
**/*my problem is how could i search for the string s in the Menu object and find its price and add the string and the price to the order i try this way but it dosent work ?!!*/**
double a;
a=obj.FindMeal(s);

for(int i=0;i<10;i++)
{

if(order[i] == a)
{
order[i] = a;
break;
}
else
continue;

}
cout<<"the meal is :"<<" "<<s<<" "<<"and it's price is: "<<a;
cout<<endl;


asked 59 secs ago







C++: No match for operator == / search for a string and

Aucun commentaire:

Enregistrer un commentaire