Well for starters, it looks like your supposed to get totalNumber from the inputfile.
There are no comments in your code so I have no idea what idd is doing, or supposed to do.
If it works... For example if you run this program, I don't think the output is going to be what you wanted.
1 2 3 4 5 6
int totalNumber=4;
int idd[totalNumber];
string name[totalNumber];
cout << "idd " << idd << endl;
cout << "name " << name << endl;
Again your for statement isn't giving what I think you want.
put a cout there and see what the values are that it's giving you when you run the program.
As I said there are no comments, so i'm going way out on a limb to guess at what you want the program to do. Hopefully it will get you started.