Is this possible?
I do not have any compileable code, mostly because i am wondering if this is even possible. Is it possible to have the user input as the name of a file you are creating, for example to put a scanf statement inside the fopen. I don't belive that works but if there are any other possbile solutions to this if you could let me know it would be greatly appreciated.
Input to a string. Then pass this string to fopen. (But why are you using scanf and fopen in C++?)
Not "inside the statement", since scanf doesn't return the input directly. But you can do it in steps -- scanf a filename, and use that as the argument to fopen.
Thank you i am using these as almost practice programs as i learned C in school but no C++ class is available so im kind of halfway inbetween as i am teaching myself C++
Thank you to both anon and tabstop