Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Oct 28th, 2005, 6:52 PM   #11
BaroN NighT
Programmer
 
Join Date: Mar 2005
Location: USA
Posts: 60
Rep Power: 4 BaroN NighT is on a distinguished road
OMG your damn F***ing right!! THX MATE!
BaroN NighT is offline   Reply With Quote
Old Oct 28th, 2005, 6:55 PM   #12
tempest
Programming Guru
 
tempest's Avatar
 
Join Date: Oct 2004
Posts: 1,041
Rep Power: 6 tempest is on a distinguished road
Send a message via ICQ to tempest Send a message via AIM to tempest Send a message via Yahoo to tempest
woot, go Narue!
__________________

tempest is offline   Reply With Quote
Old Oct 28th, 2005, 7:11 PM   #13
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
[edit]Removed a split infinitive. Am I a nerd or what?[/edit]
Send it to me, I use them in my daily life. I'm running short.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Oct 29th, 2005, 2:35 PM   #14
Brent
Highly Adaptive Penguin
 
Brent's Avatar
 
Join Date: May 2005
Location: United States
Posts: 252
Rep Power: 4 Brent is on a distinguished road
just a quick not....

use
[code]

inFile.open("students.txt",ios::in);

[/code/

and

inFile.open("class.txt",ios::in);
Brent is offline   Reply With Quote
Old Oct 29th, 2005, 2:53 PM   #15
Kaja Fumei
Hobbyist Programmer
 
Join Date: Oct 2005
Posts: 134
Rep Power: 4 Kaja Fumei is on a distinguished road
Quote:
Originally Posted by Brent
just a quick not....

use
[code]

inFile.open("students.txt",ios::in);

[/code/

and

inFile.open("class.txt",ios::in);
It doesn't matter. While it would matter if the variable was a declared "fstream", it's an "ifstream" and it's open method's 2nd parameter defaults to in. Either way, you're saying the same thing.
Kaja Fumei is offline   Reply With Quote
Old Oct 29th, 2005, 7:12 PM   #16
Brent
Highly Adaptive Penguin
 
Brent's Avatar
 
Join Date: May 2005
Location: United States
Posts: 252
Rep Power: 4 Brent is on a distinguished road
my compiler messes up when i dont include "ios::in"

and it also if you want to append to a file instead of overwriting it you would want to use ios::app
Brent is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 6:01 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC