How can i automatically assign file name according to user's inputted name? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

How can i automatically assign file name according to user's inputted name?

i am trying to create a program in which number of users inout their name and i want to create a file with the user's name each time. For instance, someone input their name as albert now i wanna create a filename albert.dat without knowing his name.

5th Apr 2020, 6:43 PM
AG47
1 Answer
+ 1
store the name in a variable and pass it to file.open(var + ". dat") ;
5th Apr 2020, 7:12 PM
Bahhaⵣ
Bahhaⵣ - avatar