Forums
New posts
Articles
Product Reviews
Policies
FAQ
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Menu
Log in
Register
Install the app
Install
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
creating a text file
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="simon77" data-source="post: 1543231" data-attributes="member: 310862"><p>hello,</p><p></p><p>after long time of searching I came here for your help.</p><p></p><p>This is my program:</p><p>#include <stdio.h></p><p></p><p>int main()</p><p>{</p><p> FILE *fr;</p><p> </p><p> fr=fopen("cool.txt", "w");</p><p> if (!fr) { perror("fopen"); } else { printf("Nothing Wrong"); }</p><p> </p><p> fprintf(fr, "hello");</p><p> </p><p> fclose(fr);</p><p> </p><p> return 0;</p><p>}</p><p></p><p>I am using Xcode. After I compile it, I got printed: Nothing Wrong.. But when I want to find my text file, I can not.. I tried even searching through spotlight, but I could not find it..</p><p></p><p>Please help ...</p></blockquote><p></p>
[QUOTE="simon77, post: 1543231, member: 310862"] hello, after long time of searching I came here for your help. This is my program: #include <stdio.h> int main() { FILE *fr; fr=fopen("cool.txt", "w"); if (!fr) { perror("fopen"); } else { printf("Nothing Wrong"); } fprintf(fr, "hello"); fclose(fr); return 0; } I am using Xcode. After I compile it, I got printed: Nothing Wrong.. But when I want to find my text file, I can not.. I tried even searching through spotlight, but I could not find it.. Please help ... [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
creating a text file
Top