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="McBie" data-source="post: 1543254" data-attributes="member: 54417"><p>You might be mixing things up .....</p><p>you opened a file in a specific path.</p><p>Then you open a file for " read " in the path where you are running the binary from ... does that file exist in that directory ? I assume not and that is why your file pointer = NULL and it prints " hi "</p><p></p><p>Edit .... you are also using the same file pointer for 2 different files <img src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7" class="smilie smilie--sprite smilie--sprite1" alt=":)" title="Smile :)" loading="lazy" data-shortname=":)" /></p><p></p><p>Cheers ... McBie</p></blockquote><p></p>
[QUOTE="McBie, post: 1543254, member: 54417"] You might be mixing things up ..... you opened a file in a specific path. Then you open a file for " read " in the path where you are running the binary from ... does that file exist in that directory ? I assume not and that is why your file pointer = NULL and it prints " hi " Edit .... you are also using the same file pointer for 2 different files :-) Cheers ... McBie [/QUOTE]
Verification
Name this item 🌈
Post reply
Forums
macOS & iOS Developer Playground
macOS - Development and Darwin
creating a text file
Top