cplusplus
.com
TUTORIALS
REFERENCE
ARTICLES
FORUM
C++
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs
Forum
Beginners
while input test
while input test
Oct 5, 2010 at 4:18am UTC
pistol1
(10)
I have a program and need a while loop to check if the program is open. how do I code while file not open repeat cin.
Do I
use while (!infile)
cin >> filename
I have been tought to be careful of negations.
Oct 5, 2010 at 5:30am UTC
sohguanh
(1236)
Take a look at
http://www.cplusplus.com/reference/iostream/ifstream/is_open/
which has something very close to what you want.
Topic archived. No new replies allowed.