cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
I need to revise this code to copy files
Page 2
I need to revise this code to copy files using binary I/O
Pages:
1
2
Mar 7, 2011 at 10:23am UTC
coder777
(8444)
jonsto
wrote:
so that is all I would have to change from the original code to convert binary files?
As far as I can see it: Yes.
Note that other libraries like boost already have a full fledged file copy, rename, and so on.
Mar 7, 2011 at 2:11pm UTC
ultifinitus
(1446)
sohguanh
wrote:
Why need vector<string> or other data structure to incur un-necessary cost ?
Where did you get a vector<string> from?!
The reason I recommended a vector<char> is it's the prefferred way of storing binary data in c++ according to these posts: (someone on the internet is WRONG?!?!)
http://stackoverflow.com/questions/441203/proper-way-to-store-binary-data-with-c-stl
This gives both sides
http://stackoverflow.com/questions/837521/c-stls-string-eqivalent-for-binary-data
But hey, if you want to use a string, let the wind unfurl your wings onto the sands of the explored.
Topic archived. No new replies allowed.
Pages:
1
2