From: "Al Morgan" Newsgroups: comp.os.msdos.djgpp Subject: Re: Changing Text with Iteration... Date: Sun, 26 Dec 1999 20:57:36 -0800 Organization: Posted via Supernews, http://www.supernews.com Lines: 44 Message-ID: References: <83ve6e$bur$1 AT bob DOT news DOT rcn DOT net> X-Complaints-To: newsabuse AT supernews DOT com X-Newsreader: Microsoft Outlook Express 5.00.2314.1300 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com I don't use that header file, so I can't help with the rest of the program, but dont' you want to: #include (with emphisis on the .h). Tom wrote in message news:83ve6e$bur$1 AT bob DOT news DOT rcn DOT net... > Can anyone tell me what is wrong with the following code? I am trying to > load a mp3 playlist into memory and then change each "\" to a "/" so it can > be read by the software I am using. I can only get the first line to work. > I am trying to assign each line to a number with the string a[int]. Please > help. Thanks. > > #include > #include > > int main() > { > string a[500]; > string s; > int n = 0; > int m = -1; > ifstream inputfile("mylist.m3u"); > while ( getline( inputfile, s) ) > { > while (s[++m]) > { > if (s[m] == (char) 92) > s[m] = (char) 47; > } > a[++n]=s; > cout << n << ". " << a[n] << endl; > } > return 0; > } > >