Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Agrelahar

File Editing

This topic is 5380 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
*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*

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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!

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
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.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!