Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
Person
{
int ID;
char* Name;
}
MyData[] = {
{1,"BOB"},
{2,"Steve"},
...
{100,"MIKE"}};
BUT this uses char pointers and I dont think it is the approach you are looking for.
The other approach is to do
struct Person
{
int ID;
char name[50];
Person(int id,char* n):ID(id)
{
strcpy(name,n,sizeof(n));
name[strlen(n)]=0;
}
}
MyData[100];
Person* MyData[100];
for(int i = 0;i<100;i++)
{
myData[i] = new Person(i,arrayOfNames[i]);
}