Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Declare a vector named availablePizzas that stores 3 items of type PizzaIngredients. #include #include #include using namespace std; struct PizzaIngredients { string pizzaName; string ingredients;

Declare a vector named availablePizzas that stores 3 items of type PizzaIngredients.

#include #include #include using namespace std;

struct PizzaIngredients { string pizzaName; string ingredients; };

int main() {

/* Your solution goes here */

availablePizzas.at(0).pizzaName = "Barbecue"; availablePizzas.at(1).pizzaName = "Carbonara"; availablePizzas.at(2).pizzaName = "Ham and Cheese"; availablePizzas.at(0).ingredients = "Beef, chicken, bacon, barbecue sauce"; availablePizzas.at(1).ingredients = "Mushrooms, onion, creamy sauce"; availablePizzas.at(2).ingredients = "Ham, cheese, bacon";

cout << availablePizzas.at(0).pizzaName << ": " << availablePizzas.at(0).ingredients << endl; cout << availablePizzas.at(1).pizzaName << ": " << availablePizzas.at(1).ingredients << endl; cout << availablePizzas.at(2).pizzaName << ": " << availablePizzas.at(2).ingredients << endl;

return 0; }

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Beginning C# 5.0 Databases

Authors: Vidya Vrat Agarwal

2nd Edition

1430242604, 978-1430242604

More Books

Students also viewed these Databases questions

Question

explain the advantage and disadvantage of input output tables

Answered: 1 week ago

Question

3. Evaluate your listeners and tailor your speech to them

Answered: 1 week ago