[Solved] Can’t inside more than 1 time C++ [closed]


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 analysis and function details. So the data you store in those variables from analysis function is not getting accessed in details. So, make those variables global.
  • In analysis, you have put for statement at wrong place. The for loop is not iterating. That’s why you are not able to insert data more than once.
  • In details, there is no for loop to get the data from array.
  • voterid is an array. So, put value in it using the index – like: voterid[i] where i is the index.
  • You may use iostream instead of iostream.h in header file.

solved Can’t inside more than 1 time C++ [closed]