Hey guys so is there a way to write a piece of code that will allow the user to name the file being created? So for instance in my code i have
File * ftpr
ftpr = fopen("my path/filenameiwanthere.txt", "w");
so in the area i wrote "file name i want here" am i capable of including a string literal without any spaces so the user can create the name of the file? for instance i was thinking of something like
printf("What would you like to save this file under?);
scanf("%s", filename);
if they insert "car1" i want the above to basically read
ftpr = fopen("mypath/car1.txt.", "w");
So the idea here is I have a friend that own a car detailing business and everything they do is pen and paper. Customer names, car, license plate, how much its going to cost, what needs to be done, who worked on the car, blah blah blah. But its all so completely unorganized so in an effort to help/ and strengthen my programming skills I would like to write them something useful. I have an idea of what exactly I will be doing. I was just wondering if there was a way to save the file name as something they would prefer. So if they were on their desktop computer at work i could have a folder that said "Cars" or whatever and in that folder would be multiple files with their desired name and all the information for the car. Thanks guys.