OK, heres whats happening. This part of the program can open a .app which the user specifies. It works perfectly on everything... except when there are spaces. For example (I am on a mac) if I was to open itunes, I would simply type in itunes, but if I want to open Photo Booth, im screwed because of the spaces. Now I already have the program to set quotes, but I think the problem is that I can't scan for spaces. I am using scanf() right now to get the program name, tryed gets() but that didn't work at all, it just skipped right past it. but anyway heres the code. This was kinda hard to explain so if you have a question just ask.
Code:
if(toupper(choice[0]) == 'O')
{
char empty1[25];
char empty2[55];
char applic[15];
char applic2[18];
printf("Type in the name of the app\n");
scanf(" %s", applic); //scaned here
sprintf(applic2, "\"%s\"", applic);
sprintf(empty1, "open -a %s", applic2);
sprintf(empty2, "%s.app", empty1);
system(empty2);
}