File Editing

Started by
9 comments, last by Agrelahar 20 years, 5 months ago
I would''ve used the search because I''m 99% sure I saw this already, but it''s not working. So anyway, where can I find out how to, edit, copy to, create, etc. files?
Advertisement
Search work fine for me.
You have to be a little bit more specific about what you want. File mapipulation using the commandline, using C, Basic,... or whatever.
Oops, sorry, I forgot about that part. C++ is what I want to do it in. I ultimately want to figure out how to make installers for my software.
*gets on his knees to beg and makes a puddle of tears* :''(

Will anyone tell me how to copy files to another location in c++? Even pointing me to a tutorial/website would be acceptable.

I wouldn''t keep bugging, but I looked on google for about 15 minutes and then looked on the forum without finding what I wanted.

*promises to never bump again*
Here it goes, but it isn't for free. You owe me a dozen cookies now.

Reading from file
Reading from file, part 2
Writing files

That should do the trick. If not, buy a good book on C++, it might help you. btw, for making an installer, you only need to know how to insert files as a resource into an installer and how to retrieve them as resource handle. Then you can write the files using file i/o. And for copying, check out the win32 platform SDK.

Toolmaker


-Earth is 98% full. Please delete anybody you can.

[edited by - toolmaker on October 22, 2003 6:50:10 PM]

quote:Original post by Toolmaker btw, for making an installer, you only need to know how to insert files as a resource into an installer and how to retrieve them as resource handle. Then you can write the files using file i/o.

I don''t believe I''m allowed to use ready-to-use installers for what I''m doing if that''s what you mean, but I''ll check out the win32 sdk thing tomorrow morning (my 56k conn. gets slower than s-mail at night).

Thanks.
Zip your files to package them together if you''re not ready to use a installer.


"I turned into a driveway I thought was mine and crashed into a tree I don't have."- a real insurance claim
I need to use an installer though. :/

__________________________________________
So all of you talent-seekers from EA can find me more easily, here is my resume:
I have made nothing in C++. No, really, I have made a program that says "Hello world!". No, really, I have made a number guessing game. No, really, I have made a simple battelship game using only arrays. No, really, I actually tried to learn something from GPaiO. Now that''s difficult!
Simple way to copy: open source file for reading, destination file for writing, then read a block from src and write it to dest. Should work with fopen and co. as well as with the C++ fstreams.

[edited by - VolkerG on October 23, 2003 5:37:14 AM]
I know it seems archaic, but sometimes I use dos commands in my programs. All you have to do is use

system("copy file1.??? file2.???";

and it should work on all windows OS''s. It may be poor style, I know nothing about style because I learned programming from a C book from the 80''s, but it works. It may not be ''allowed'' (Homework, anyone?), but it is one easy way to do it.

This topic is closed to new replies.

Advertisement