Image

Imagefoxsgurl wrote in Imagecpp 😡irritated

HELP!

I'm just learning C programming, this is my first class, and this is only my third or so program. I've got almost all the bugs worked out but this one thing is driving me absolutely nuts. 






I need the variable cust_name to accept spaces,because, I need it to store a customers first and last name

Here's how I have it listed under my global variables:

char cust_name[20];

And this is where I want the user to input the customers name:

printf("Enter customer name: ");
scanf("%s",cust_name);


Whenever I try to run the program as I have it now, and I try to use a firstname and lastname, it skips a few of the next printf and scanf commands, which I would kind of like it to quit doing.




Any help would be very much appreciated.