how to print bottom to up

must do classes how to put it in all?

 A constant global variable SIZE with value 8.
 A class SportShoe_Inventory with the following:
o Private data members : name (string type); warehouses[SIZE] (int type)
o Public member function:
 display_reverse()
• Declare a pointer in this function as numPtr(int* type) and use this pointer to display the array elements of warehouses in reverse order
 set_data(int*)
• Get user input for name
• The function has a pointer argument.
• In a for loop, use the pointer argument to initialize warehouses array.

In the main():
(i). Declare an object of the class above
(ii). Declare an array of 10 integer elements and initialize it with the values {5, 10, 15, 20, 25, 30, 35, 40}
(iii). Using the object (created at (i)), make function call to set_data(….) passing the array declared at (ii).
(iv). Using the object (created at (i)), make function call to display_reverse()
Do you know anything about classes? If not, start reading your textbook or this tutorial: http://www.cplusplus.com/doc/tutorial/classes
Have you started this project? If you have, please post some of what you've done already and write comments where you need help.
ya i know classes i tried to put in the class. but im not sure i get it write or not.

here so far i tried.


#include<iostream>
#include<string>
using namespace std;


//CLASS SPORTSHOES_INVENTORY
class SportShoes_Inventory
{
private :
string name[]; //shoes name
int warehouse[100]; //which warehouse

public:
void display_reverse( int*type= numPtr); //use pointer array for reverse order

};

void set_data(int*); // get user input for names= function has a pointer argument.


please tell me if theres wrong
Topic archived. No new replies allowed.