minecraft_inventorys_system.cpp - #include...

This preview shows page 1 - 2 out of 4 pages.

#include <iostream> #include <fstream> #include <string> #include <iomanip> #include <windows.h> using namespace std; class Item { private: string item_name; string description; public: Item() { item_name = "Book"; description = "Can be used to write journal entries"; } Item(string n, string d) { item_name = n; description = d; } void set_item_name(string n) { item_name = n; } void set_description(string d) { description = d; } string get_item_name() { return item_name;} string get_description() { return description;} void display_item() { cout << "Item Name: " << item_name << endl; cout << "Description" << description << endl; } }; void get_data(Item inventory[], int SIZE); void quick_sort(Item inventory[], int start, int end); int partition(Item inventory[], int start, int end); void swap(Item inventory[], int index1, int index2); int binary_Search(Item inventory[], int first, int last, string searchTerm); void display_inventory(Item inventory[], int size); void display_menu(); void search_function(Item inventory[], int SIZE); int main() { //declares array and int const int SIZE = 8; Item inventory[SIZE]; //grabs data and sorts it
Image of page 1

Subscribe to view the full document.

Image of page 2
  • Spring '15
  • Guillermo Flores
  • getline, Void type, Carriage return, #include

{[ snackBarMessage ]}

Get FREE access by uploading your study materials

Upload your study materials now and get free access to over 25 million documents.

Upload now for FREE access Or pay now for instant access
Christopher Reinemann
"Before using Course Hero my grade was at 78%. By the end of the semester my grade was at 90%. I could not have done it without all the class material I found."
— Christopher R., University of Rhode Island '15, Course Hero Intern

Ask a question for free

What students are saying

  • Left Quote Icon

    As a current student on this bumpy collegiate pathway, I stumbled upon Course Hero, where I can find study resources for nearly all my courses, get online help from tutors 24/7, and even share my old projects, papers, and lecture notes with other students.

    Student Picture

    Kiran Temple University Fox School of Business ‘17, Course Hero Intern

  • Left Quote Icon

    I cannot even describe how much Course Hero helped me this summer. It’s truly become something I can always rely on and help me. In the end, I was not only able to survive summer classes, but I was able to thrive thanks to Course Hero.

    Student Picture

    Dana University of Pennsylvania ‘17, Course Hero Intern

  • Left Quote Icon

    The ability to access any university’s resources through Course Hero proved invaluable in my case. I was behind on Tulane coursework and actually used UCLA’s materials to help me move forward and get everything together on time.

    Student Picture

    Jill Tulane University ‘16, Course Hero Intern