Answer:
#include <iostream>
#include <cstring>
using namespace std;
struct Data {
int userId;
char name[80];
}
void newData(string data char[]){
int counts= 0;
struct Data name;
data.userId = ++counts;
data.name = char[];
cout<< data.userId << "\\"<< data.name ;
}
int main( ) {
char myName;
string mydata;
cin>> myName;
cin>> mydata;
newData( myName, mydata);
}
Step-by-step explanation:
The c++ source code above stores its data in a struct called "Data". The function newData dynamically creates new data from the struct defined.