I got a function that returns a number. However it seems like there's something I do wrong when using the function, before I didn't use it like a pointer - but how do I do that?
'read': none of the 2 overloads could convert all argument types is the error I'm getting.
Here's the code:
int nr = read("This is a test", 0000, 9999);
cout << nr;
int read(char* t, int min, int max) {
int number;
do {
cout << '\t' << t << " (" << min << '-' << max << "): ";
cin >> number; cin.ignore();
} while (number < min || number > max);
return number;
}