Results 1 to 2 of 2

Thread: C Command Processing <Sorted>

Threaded View

  1. #1

    Thread Starter
    Addicted Member señorbadger's Avatar
    Join Date
    Oct 2003
    Location
    Mud pools of wellingborough
    Posts
    193

    Resolved C Command Processing <Sorted>

    Hi again

    i want to make my application allow the user to enter set commands,
    i cant seem to get it to use a switch statement to find out what was entered

    here is an example
    Code:
    	char cnd[4];
    	cnd = strncpy(cmddata,0,4);
    
    switch(cnd)
    	{
    	     case "HELP"
                    printf("here is a list of the commands");
                  case "STOP"
    	}
    }
    thanks again
    Last edited by señorbadger; Oct 9th, 2004 at 01:44 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width