Getting a Memory leak. valgrind
says it might be somewhere in here. Any help would be really appreciated. Somewhere maybe around enter relevant sort
....where algorithm is one of bubble, sort2, or sort 3
void usageAbort(string progname, string message)
{
cerr << message << endl
<< "Usage: " << progname << " algorithm" << endl
<< " where algorithm is one of "
<< "bubble, sort2, or sort3"
<< endl;
exit(1);
}
/***************************************************************************/
/** **/
/***************************************************************************/
string algorithmFromCommandLine(int argc, char *argv[])
{
string program = argv[0];
string algorithm = argv[1];
if(argc!=2){
usageAbort(program, "enter proper argument count");
}
if((algorithm == "bubblesort") or (algorithm == "quicksort") or
(algorithm== "insertionsort")){
return algorithm;
}
else{
usageAbort(program,"enter relevant sort");
}
return 0;
}