how do i make it so if i use a file input and output so that is will save the .txt file were i wont and not were the compiled program is...
how do i make it so if i use a file input and output so that is will save the .txt file were i wont and not were the compiled program is...
you can read and write to a file from any specific location regardless of where your exe is located.
Last edited by The Brain; 07-09-2005 at 02:40 AM.
- "Problem Solving C++, The Object of Programming" -Walter Savitch
- "Data Structures and Other Objects using C++" -Walter Savitch
- "Assembly Language for Intel-Based Computers" -Kip Irvine
- "Programming Windows, 5th edition" -Charles Petzold
- "Visual C++ MFC Programming by Example" -John E. Swanke
- "Network Programming Windows" -Jones/Ohlund
- "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
- "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel
i know you can but how?Originally Posted by The Brain
i need the code specificly
If you provide a full path as the filename, the file will be saved to that path. If you provide a relative path, it will be saved relative to the current directory when you run your program.
I invite ye' to check out this recent thread on file i/o.Originally Posted by firefly
i know you can but how?
i need the code specificly
- "Problem Solving C++, The Object of Programming" -Walter Savitch
- "Data Structures and Other Objects using C++" -Walter Savitch
- "Assembly Language for Intel-Based Computers" -Kip Irvine
- "Programming Windows, 5th edition" -Charles Petzold
- "Visual C++ MFC Programming by Example" -John E. Swanke
- "Network Programming Windows" -Jones/Ohlund
- "Sams Teach Yourself Game Programming in 24 Hours" -Michael Morrison
- "Mathmatics for 3D Game Programming & Computer Graphics" -Eric Lengyel
im srry but my reply was put in the wrong thred i was going too quickly