nrupparikh -3 Newbie Poster
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.
Depends on the circumstances. Here's one way.
ofstream.fout("DesiredNameOfFileToCreate.txt");
Do you not know how a search engine works?
Try typing in "how to create file in c++" (your original question without the typo),
and the first link has your answer.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.