|Mar 1, 2012, 07:54 AM||#1|
How to use C++ <fstream> output files with Xcode?
I am learning C++ at school, but I have a Mac and I just started using Xcode. I use the fstream library.
I need to know where the ".out" file is located or how to create it.
I managed to create the input file and if I use "cout" to display the result it works. Hope I explained everything well, here is a very basic program to show you what I mean:
using namespace std;
|Mar 1, 2012, 03:45 PM||#2|
Your code creates the output file. In this case, it will be created in the folder from which you run the program. If you are running it from within Xcode, you can set your working directory, or use the default. I'm not sure where the default location is.
|Mar 1, 2012, 05:05 PM||#3|
This thread shows where to set the Working Directory in Xcode 4:
If you're not using Xcode 4, please identify your Xcode version.
|Thread Tools||Search this Thread|
|thread||Thread Starter||Forum||Replies||Last Post|
|How to create and use input/output files with Xcode C++||hotglass||Mac Programming||14||Feb 6, 2012 10:53 PM|
|Learning how to use Xcode / interface builder to program in c/++||furycd001||Mac Programming||6||Sep 20, 2011 04:45 AM|
|Help: How to read Mac Excel 2008 files with WinXP Excel 2003||MacGiver||Mac Basics and Help||1||May 4, 2008 05:16 PM|
|how to use an external hard drive with mac and pc?||mversion||Mac Basics and Help||2||Jul 17, 2006 07:52 PM|
All times are GMT -5. The time now is 08:37 AM.