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
How do you create a txt file from c++¿?
How do you create a txt file from c++¿?
Apr 2, 2012 at 9:21pm UTC
hades80
(9)
I would like to create a txt file where I would have hosted datas from the code.
Can anybody help me?
Apr 2, 2012 at 9:30pm UTC
ui uiho
(382)
#include <ftstream>
int main(){
std::ofstream file;
file.open("filelocation.text"); //actually allocation and creation here
file.close(); //make sure to close the file after using
return 0;
}
Topic archived. No new replies allowed.