Permalink
Cannot retrieve contributors at this time
Name already in use
A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
FarmingGame/shop.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
23 lines (18 sloc)
574 Bytes
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef SHOP_H | |
#define SHOP_H | |
#include <string> | |
#include <vector> | |
using namespace std; | |
class Shop { //declares class as 'Shop' | |
private: | |
struct shopitem { //groups together the variables of different types into one single unit | |
string name; | |
int price; | |
}; | |
vector<shopitem> items; //declares a vector named "items" that holds the items from the struct shopitem. - each item given a name and price | |
public: | |
int price; | |
Shop(); //constructor for the 'Shop' class | |
void beginshopping(); //will display what items are being sold | |
}; | |
#endif |