OOPp6
OOPp6
#include <vector>
#include <algorithm>
struct Item {
string code;
string name;
double cost;
int quantity;
};
// Main function
int main() {
vector<Item> items;
int n;
cin >> n;
Item item;
getline(cin, item.code);
getline(cin, item.name);
items.push_back(item);
printItem(item);
string searchCode;
getline(cin, searchCode);
if (item.code == searchCode) {
printItem(item);
found = true;
break;
if (!found) {
return 0;
OUTPUT