Question: Need help solving this code! Thanks. Write the code for a class called DataStack that will store any number of strings (where each string will

 Need help solving this code! Thanks. Write the code for a

class called "DataStack" that will store any number of strings (where each

Need help solving this code! Thanks.

Write the code for a class called "DataStack" that will store any number of strings (where each string will not exceed 80 characters). NOTE: This will require a pointer that can hold ANY number of 81 byte strings declared as: char (*s)[81]; // s is a pointer that can store ANY number of 81 byte char arrays. The DataStack class MUST be prototyped exactly as listed below: #include using namespace std; #include #include class DataStack { private: char (*s) [81]; int lim, count; public: DataStack(int n); int operator using namespace std; #include #include int main() { char text[8][41] = { "Illusion", "Grand", "The", "10", "Welcome", "Come", "On", "In" DataStack ts(5); // ts can hold up to 5 strings int i, ok; for(i=0; i

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!