Results 1 to 1 of 1
Thread: Programming C on Xcode
-
01-23-2012, 07:53 PM #1
- Member Since
- Jan 23, 2012
- Posts
- 1
Programming C on XcodeI have a C program that among many things I want it to read the input from a file and write it in another file. The problem with the input file and the output file is the same. Unless I write the whole path for the file, it does not recognize the fopen instruction.
I will include the piece of code so I can explain myself better: If I write:
PHP Code:outfile = fopen("UnifE-n51-k5", "w");
fprintf(outfile,"a \t b \t ajuste \t media \n");
fprintf(outfile,"==================================\n");
However if I give the entire path for the file
PHP Code:outfile = fopen("/Users/Marta/Documents/VRPStochastic/UnifE-n51-k5", "w");
fprintf(outfile,"a \t b \t ajuste \t media \n");
fprintf(outfile,"==================================\n");
Thanks a lot for your help.
Thread Information
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)
Similar Threads
-
How to start c-programming in xcode? (student on mac)
By vidarski in forum macOS - Operating SystemReplies: 3Last Post: 09-02-2011, 10:28 AM -
Programming in xcode
By katlb in forum Switcher HangoutReplies: 1Last Post: 01-21-2011, 08:07 PM -
New to programming. Having trouble with Xcode
By Chris23 in forum macOS - Development and DarwinReplies: 1Last Post: 11-23-2010, 06:51 PM -
C++ Programming with XCode 2
By novicew in forum macOS - Apps and GamesReplies: 7Last Post: 09-24-2009, 02:02 AM -
Programming basic C in Xcode
By DrQuincy in forum macOS - Development and DarwinReplies: 4Last Post: 01-16-2008, 03:22 PM