Re: [c-prog] File open problem

2010-02-23 Thread Paul Herring
On Tue, Feb 23, 2010 at 2:22 PM, Jimmy Johnson wrote: > Using visual studio 2008 express... > > I can not open a file; f.is_open() is false. > > ifstream f; > int num_patches; > > f.open ("teapot.txt"); > if (f.is_open()) { >        while (! (f.eof())) { Not related to your question, but using eo

Re: [c-prog] File open problem

2010-02-23 Thread Brett McCoy
On Tue, Feb 23, 2010 at 9:22 AM, Jimmy Johnson wrote: > Using visual studio 2008 express... > > I can not open a file; f.is_open() is false. > > ifstream f; > int num_patches; > > f.open ("teapot.txt"); > if (f.is_open()) { >        while (! (f.eof())) { >                f >> num_patches; > ... >

[c-prog] File open problem

2010-02-23 Thread Jimmy Johnson
Using visual studio 2008 express... I can not open a file; f.is_open() is false. ifstream f; int num_patches; f.open ("teapot.txt"); if (f.is_open()) { while (! (f.eof())) { f >> num_patches; ... So where do I put the "teapot.txt" file? I have tried several directories.