Question: Need C++ Help. Need to make .h files for these two template files: Table.template: template class Table{ protected: int szRow; int szCol; RowAray **columns; public:

Need C++ Help. Need to make .h files for these two template files:

Table.template:

template class Table{ protected: int szRow; int szCol; RowAray **columns; public: Table(unsigned int,unsigned int); Table(const Table &); virtual ~Table(); int getSzRow()const {return szRow;} int getSzCol()const {return szCol;} T getData(int,int)const; void setData(int,int,T); Table operator+(const Table &); };

RowAray.template:

template class RowAray{ protected: int size; T *rowData; public: RowAray(int); virtual ~RowAray(); int getSize()const{return size;} T getData(int i)const{ if(i>=0&&i

main.cpp:

//User Libraries #include #include #include #include using namespace std;

//User Libraries #include "Table.h"

//Global Constants

//Function Prototype template void prntRow(RowAray *,int); template void prntTab(const Table &);

//Execution Begins Here! int main(int argc, char** argv) { //Initialize the random seed srand(static_cast(time(0))); //Declare Variables int rows=3,cols=4; //Test out the Row with integers and floats RowAray a(3);RowAray b(4); cout tab1(rows,cols); Table tab2(tab1); Table tab3=tab1+tab2; cout

template void prntRow(RowAray *a,int perLine){ coutgetSize();i++){ coutgetData(i)

template void prntTab(const Table &a){ cout

How the output should look:

Need C++ Help. Need to make .h files for these two template

files: Table.template: template class Table{ protected: int szRow; int szCol; RowAray **columns;

Review3_CIS17c Template NetReans TDE 8.02 ble Eat yew ,vgate Surce Refactor &n 2ebug Erofile Team looks wndow t Searh (Cr-+) Projects Cas Fl Services ts Crd Deck 4 Dynanic Output- Review3_CI317c_Template (Build, Run) X Test the Integer Row . Table.h a67 75 52 Resource Res |g source Files main cpp TestFls ortant Res Test the Float Row 25.0 99.0 33.0 10.0 Float Table 3 size is [row, col] - Table 1+ Table 2 13,4] 174.0 52.0 60.0 130.0 100.0 58.0 156.0 42.0160.0 168.0 68.0 78.0 RUN SUCCESSFUL (total time: 187ms)

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!