User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the C++ section within the Software Development category of DaniWeb, a massive community of 456,484 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,835 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our C++ advertiser: Programming Forums

problem opening CSV file

Join Date: Nov 2006
Posts: 10
Reputation: Harshita_garg is an unknown quantity at this point 
Rep Power: 3
Solved Threads: 0
Harshita_garg Harshita_garg is offline Offline
Newbie Poster

Re: problem opening CSV file

  #3  
Feb 5th, 2007
Hi!! heres the code I am using:-

const int MAX=100;
char str[MAX];
ifstream infile;
infile.open("abc.csv");
// I have also tried giving the full path here
if(!infile)
   cout<<"unable to open file";

{
   infile.getline(str,MAX);
   cout<<endl<<str;
} 

When compiled & run, this program opens txt file but is unable to open a csv file.

Please help.
Last edited by WaltP : Feb 5th, 2007 at 4:07 pm. Reason: Corrected CODE tags -- use the Preview button
Reply With Quote  
All times are GMT -4. The time now is 2:58 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC