Label can only be used as part of a statement Error
问题 I have been looking through the forums but I have not found an answer to this question that applies to my situation. I am trying to make a system call to using 'sort' (unix), however, I receive an error saying, "a label can only be part of a statement and a declaration is not a statement." Here is the code causing the error. int processid; switch(processid = fork()){ //establishing switch statement for forking of processes. case -1: perror("fork()"); exit(EXIT_FAILURE); break; case 0: char