I'm making a short database application where people can assign variables to something.
like
cout << "Enter song ID#": cin >> x; But I want to prompt the user if there was already a value stored in x. Is there a way to discern between the garbage values initially stored in x and other values?
that way I can do something like
cout << "Enter song ID#": cin >> x; if (isUsed(x)) cout << "Do you want to overwrite this value?"; EDIT x is actually a dynamic array so I cannot initialize it..or can I?