Your browser does not seem to support CSS. If images appear below, please disregard them.
It appears that you're running an Ad-Blocker. This site is monetized by Advertising and by ">User Donations; we ask that if you find this site helpful that you whitelist us in your Ad-Blocker, or make a ">Donation to help aid in operating costs.
Previous Thread
Next Thread
Print Thread
Rate This Thread
#17201 - 05/06/05 10:24 PM How do you open files with C++ through Windows?  
Joined: May 2005
Posts: 4
chav-tastic bob Offline
Junior Member
chav-tastic bob  Offline
Junior Member

Joined: May 2005
Posts: 4
England
i.e. what command do you use?

Could anyone give me an example?
Say I wanted to open C:\mypic.jpg and C:\myapp.exe , both in Windows (using C++)

thanks

Sponsored Links
#17202 - 05/07/05 06:04 PM Re: How do you open files with C++ through Windows?  
Joined: Mar 2002
Posts: 93
zenon Offline
Junior Member
zenon  Offline
Junior Member

Joined: Mar 2002
Posts: 93
Sweden
Well.. that depends, you can open a file in binary or non-binary mode.
I supose you want to open the files in binary mode, yes? Annyway

----------------------------
#include<fstream.h>
void main()
{
fstream filestr;
filestr.open ("test.txt", fstream::binary);
}


- "It's not my code that's useless
it's you loosers being unable to
apprecitate it because of your
lack of skills!"
/zenon - C++ master Apprentice
#17203 - 05/14/05 06:29 PM Re: How do you open files with C++ through Windows?  
Joined: May 2005
Posts: 4
chav-tastic bob Offline
Junior Member
chav-tastic bob  Offline
Junior Member

Joined: May 2005
Posts: 4
England
Thanks

(I *did* try looking through diff C++ guides first: most proved utterly useless)


Member Spotlight
Gremelin
Gremelin
Portland, OR; USA
Posts: 7,198
Joined: February 2002
Show All Member Profiles 
Forum Statistics
Forums45
Topics33,918
Posts69,060
Members2,165
Average Daily Posts3
Members2,165
Most Online1,567
Apr 25th, 2010
Latest Postings
There is not any party like an arm party
by bagful on 04/27/17 06:26 AM
The innovative concept keep
by bagful on 04/27/17 06:25 AM
The Nike Blazer Studio Mid Decon
by bagful on 04/27/17 06:24 AM
a fresh white enhance midsole device
by bagful on 04/27/17 06:23 AM
shopping for jewelry with something above
by mikejoey on 04/12/17 08:01 AM
PANDORA North The usa
by mikejoey on 04/12/17 07:38 AM
Pandora’s birthstone products will always
by mikejoey on 04/12/17 07:14 AM
the newest Pandora necklaces crafting facility
by mikejoey on 04/12/17 06:53 AM
an Air Jordan 4 by Off White is in
by mikejoey on 04/12/17 06:35 AM
belonging to the adidas NMD XR1
by mikejoey on 04/12/17 05:50 AM
Top Posters(All Time)
UGN Security 41,138
Gremelin 7,198
§intå× 3,255
SilentRage 1,273
Ice 1,146
pergesu 1,136
Infinite 1,041
jonconley 955
Girlie 908
unreal 860
Top Liked Users (All Time)
§intå× Likes: 3
Black Beard Likes: 1
Cold Sunn Likes: 1
Crime Likes: 1
Cyrez Likes: 1
fleshwound Likes: 1
Ghost Likes: 2
Gremelin Likes: 12
Ice Likes: 1
ninjaneo Likes: 1
Top Liked Users (30 Days)
No Data Found
Powered by UBB.threads™ PHP Forum Software 7.6.0
(Snapshot build 20170206)