Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.c++ > #5857
| From | Ian Collins <ian-news@hotmail.com> |
|---|---|
| Newsgroups | comp.lang.c++ |
| Subject | Re: File Manipulation? |
| Date | 2011-05-31 12:24 +1200 |
| Message-ID | <94iqqaFr2iU13@mid.individual.net> (permalink) |
| References | <c32da847-b415-4ba3-954c-e51ee8cbf5ff@e35g2000yqc.googlegroups.com> |
On 05/31/11 12:20 PM, A Moose in Love wrote:
> I need to know in a simple way, how to create files, open them, write
> to them, save them, and close them. I've googled and have come up
> with information that doesn't seem to work. For example:
> // basic file operations
> #include<iostream>
> #include<fstream>
> using namespace std;
>
> int main () {
> ofstream myfile;
> myfile.open ("example.txt");
> myfile<< "Writing this to a file.\n";
> myfile.close();
> return 0;
> }
>
> This does not work. I cannot find a file after running this little
> program called 'example.txt'.
The code is fine. Are you sure you are looking in the correct place for
the fine?
--
Ian Collins
Back to comp.lang.c++ | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
File Manipulation? A Moose in Love <parkstreetbooboo@gmail.com> - 2011-05-30 17:20 -0700
Re: File Manipulation? Ian Collins <ian-news@hotmail.com> - 2011-05-31 12:24 +1200
Re: File Manipulation? Öö Tiib <ootiib@hot.ee> - 2011-05-30 18:15 -0700
Re: File Manipulation? A Moose in Love <parkstreetbooboo@gmail.com> - 2011-05-30 19:22 -0700
Re: File Manipulation? Ian Collins <ian-news@hotmail.com> - 2011-05-31 14:33 +1200
Re: File Manipulation? John Smith <bit_bucket@gmx.com> - 2011-05-30 19:57 -0700
Re: File Manipulation? Liberian Freighter <parkstreetbooboo@gmail.com> - 2011-05-31 06:41 -0700
Re: File Manipulation? Geoff <geoff@invalid.invalid> - 2011-05-30 19:59 -0700
Re: File Manipulation? Geoff <geoff@invalid.invalid> - 2011-05-30 20:25 -0700
Re: File Manipulation? Jorgen Grahn <grahn+nntp@snipabacken.se> - 2011-05-31 22:33 +0000
Re: File Manipulation? Miles Bader <miles@gnu.org> - 2011-06-01 15:07 +0900
Re: File Manipulation? Juha Nieminen <nospam@thanks.invalid> - 2011-05-31 08:25 +0000
Re: File Manipulation? "Fred Zwarts \(KVI\)" <F.Zwarts@KVI.nl> - 2011-05-31 16:25 +0200
csiph-web