Hi,can anyone tell me how to check if a file exists,I am using turbo c++ 3.0
Thank you for your time.

anu07
Recommended Answers
Jump to PostYes, easiest is to open the file for read and check for an error.
Jump to PostWell, you want to open it using ifstream, but since your compiler is pre-standard it may not have that method of the class (I seem to remember this from another poster at one point).
What will probably work (and is also used) is to test that the ifstream object …
All 5 Replies
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
WaltP 2,905 Posting Sage w/ dash of thyme Team Colleague

anu07
jonsca 1,059 Quantitative Phrenologist Team Colleague Featured Poster
anu07 commented: worked :) +0

anu07
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.