does anyone know how to name a .txt file through c with a name recieved from a char input.
Printable View
does anyone know how to name a .txt file through c with a name recieved from a char input.
man fopen
What? You don't rename with fopen. I suppose in a round about way you could: open, open, read, write, close, close, delete, but it's much simpler to execute a simple rename()Quote:
Originally posted by orbitz
man fopen
Quzah.
what are they? everyone always talks about them.
Consider the fact that the questioner asked a rather ambigious question, fopen corresponds to how I interpreted the question.Quote:
Originally posted by quzah
What? You don't rename with fopen. I suppose in a round about way you could: open, open, read, write, close, close, delete, but it's much simpler to execute a simple rename()
Quzah.
Does the questioner mean name or rename? If they want to know how to rename it then simpley add a 're' infront of name.Quote:
does anyone know how to name a .txt file through c with a name recieved from a char input.
I know fopen is not how you rename a file, I simply interpreted the question not to be how to rename a file, but how to open a file who's name has been given through some sort of user input.
Gotcha. I read it as "rename" rather than name. I'll blame it on being tired. That's a pretty good excuse... :DQuote:
Originally posted by orbitz
Consider the fact that the questioner asked a rather ambigious question, fopen corresponds to how I interpreted the question.
Does the questioner mean name or rename? If they want to know how to rename it then simpley add a 're' infront of name.
Quzah.
Hah, thanks quzah.
Are there man pages on C? If so, where can i download 'em?
Man pages are manual pages. They originated, and exclusivly reside, in *nix operating systems. (I might be slightly off on the origin, but the point is, there aren't man pages for Windows.)Quote:
Originally posted by manwhoonlyeats
Are there man pages on C? If so, where can i download 'em?
You can access them online in a number of places. As for "man pages on C", yes and no. There are man pages on most functions. Here is one of many sources where you can view them online. Go visit Google and you may be able to find them in downloadable form.
Quzah.
Yes, there are man pages on C commands. The software for displaying them can be found here, although just about any decent operating system will have it included already.
what i mean is i want to create a user profile for the project i am working on and when a new user logs in they input their name and a text file (with the users name) of their profile is created.
that probably explains why i dont have them. i use windows.Quote:
although just about any decent operating system will have it included already.