Hi everyone. I have this college project that is giving a headache (i slept early morning at 4 am).
I want to make a table with infinite rows and 15 columns. The table should hold string elements. Kindly advise how to write a dynamic string array (or generally an excel-like table). I have tried severally but wont do due to differing data-type.
I have written the code below, you may advise where to correct:
#include <iostream>
using namespace std;
int main (){
string **landptr;
cout<<"How many records or new people do you want to enter?";
int new_people;
cin>>new_people;
landptr= new string [new_people][15];
int temp1;
for (int i=0;i<new_people; i++)
{
cout<<"Enter the number of people or records you want to register:"<<i+1;
cin>>temp1;
*(landptr+i) = temp1;
}
cout<<"You have entered the number of records as"<<*(land_transaction+i);endl;
The columns of the table will hold such data as Proprietor name, Land_reference id, Tax agency number, Physical address details of the land, status of the land, category, etc.