Not directly, but you could have your program take commands from the user to indirectly call functions in your program.
i.e.
1 2 3 4 5 6 7
string input;
getline(cin, input);
if (input=="clear")
clear();
//and so on
You could also make a small scripting language that could then be interpreted by your program, but that would be more trouble than its worth for just playing around.
When you say 'user', what do you mean? The user of a library you are writing i.e. another programmer, or the end user of an application you are writing.
This isn't a dumb question, but like Grey Wolf pointed out it is an incomplete one.
You would need to have your function except a function pointer as an argument. The rest of the answer requires you to tell us more about how you plan to use it.
You can even have the end user of the executable supply a function for your program. This is messy and will probably get me flammed for suggesting it, but it is possible.