There are lots of mistakes in this code:
- All your variables voterid[10]; votername[30]; voteraddr[30]; phone[15]; age; status[20] are local to function
analysisand functiondetails. So the data you store in those variables fromanalysisfunction is not getting accessed indetails. So, make those variables global. - In
analysis, you have putforstatement at wrong place. Theforloop is not iterating. That’s why you are not able to insert data more than once. - In
details, there is noforloop to get the data from array. voteridis an array. So, put value in it using the index – like:voterid[i]whereiis the index.- You may use
iostreaminstead ofiostream.hin header file.
solved Can’t inside more than 1 time C++ [closed]