Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > C/C++
You last visited: Today at 13:53

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Creating/saving text files

Discussion on Creating/saving text files within the C/C++ forum part of the Coders Den category.

Reply
 
Old   #1
 
Dwarfche's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 1,195
Received Thanks: 38
Creating/saving text files

How can I create txt file in a desired of me directory using C++?
Dwarfche is offline  
Old 11/28/2015, 14:30   #2
 
elite*gold: 0
Join Date: Feb 2009
Posts: 1,137
Received Thanks: 573
You could use a
warfley is offline  
Old 11/28/2015, 14:46   #3
 
Dwarfche's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 1,195
Received Thanks: 38
well, i got this code:

but im curious where this text.txt file is saved
Dwarfche is offline  
Old 11/28/2015, 15:20   #4


 
Jeoni's Avatar
 
elite*gold: 966
Join Date: Apr 2010
Posts: 1,105
Received Thanks: 681
It is saved in the current working direction where the program is executed (the directory of the program in many / most cases). But you can also pass an absolute path like that:
Code:
file_.open("C:\\text.txt");
In that case the file is always located as C:\test.txt regardless of where the program is executed.
With best regards
Jeoni
Jeoni is offline  
Old 11/28/2015, 15:28   #5
 
Dwarfche's Avatar
 
elite*gold: 0
Join Date: May 2013
Posts: 1,195
Received Thanks: 38
even like that, no text.txt file i can find in my C: disk
Dwarfche is offline  
Reply


Similar Threads Similar Threads
Saving .tga files for client side
07/26/2015 - Flyff Private Server - 0 Replies
So here it is with another question... I was editing the client interface, created a custom login screen, and then saved it as .tga file. Problem: If i save the file as a 24 bit/pixel format or higher = the black background shows up on the screen and mess everything up, as it supposed to be transparent. If I save it as 16 bit/pixel format, the black screen is actually transparent, but the whole interface looks like crap (can barely seen).
Creating c3 files, help!
04/24/2011 - CO2 Private Server - 3 Replies
Hello, I've found a topic in the templates guide section that I can create c3 files using the 3D Max 7 by adding the C3_Core.dll to the program folder, but the plugins doesn't work with newer version than 5 or 7, Can 3D Max 2011 or 2010 create c3 files? or can any other program than 3d mac do that? like Autocad , cinema 4D or AfterEffect or even Maya, do these programs have the c3 plugins? I am asking this because I can't install 3D Max 7 and there isn't any available link for the version...
[Help] Ini files and Saving
04/30/2009 - CO2 Private Server - 6 Replies
Ok this is a question i just wanna know about. I have Added Luckytime Exppot Adding Whpw now. How do i make it where it will add that into the Chars thing where it will all save.? im use to mysql:( useing lotf
[Tutorial]Creating a notepad app[Lot of Text]
11/23/2008 - CO2 Programming - 15 Replies
Create a Notepad App In this tutorial I will show you how you can create your own Notepad like Application. Start by creating a new Windows Forms Application. Now we can add some controls. The first control will be a MenuStrip. After that right click on the newly created menustrip, Select Insert Standard Items. Delete the Tools menu and the Help menu. Delete the Redo menu item from the Edit menu. Now drag and drop a TextBox onto the form.



All times are GMT +1. The time now is 13:53.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.