HomeStoreForumsWikiiPhone Native AppsiPhone AppsiPhone Apps modmyifone Downloadsmodmyifone Links






Go Back   ModMyiFone.com - iPhone | iPod Touch forums, news, apps, themes. > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion
Register FAQ Members List READ THIS Today's Posts Mark Forums Read

iPhone / iPod Touch SDK | Development Discussion SDK questions. A place for iPhone developers to post code snippets, discuss creating iPhone apps, and any other iPhone developing.


iPhone Optimized MMi | Browser Optimized MMi

Get more out of ModMyiFone by joining our free community. By registering you get privileges to download files from our downloads section and you may also post your questions in our forums! It's fast, free, and easy!

Opportunities at MMi | 1.1.4 Unlock|Jailbreak OS X / Win
Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-01-2008, 01:17 PM
What's Jailbreak?
 
Join Date: May 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
need some help with fwrite

when i use the fwrite function the app crashes to the summerboard..
do you know mabey whats the problem?
Code:
  FILE * pFile;
  char buffer[] = { 'x' , 'y' , 'z' };
  pFile = fopen ( "file" , "w+" );
  fwrite (buffer , 1 , sizeof(buffer) , pFile );
  fclose (pFile);

Last edited by vaza : 05-02-2008 at 09:25 AM.
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #2 (permalink)  
Old 05-02-2008, 06:53 AM
NetMage's Avatar
Developer
 
Join Date: Aug 2007
Device + Firmware: iPhone 1.1.3
Operating System: Windows XP
Location: Virginia
Posts: 981
Thanks: 26
Thanked 161 Times in 134 Posts

Code seems out of order. Why is pFile a FILE* and NSString*?
__________________
Starlight Computer Wizardry
Pocket-sized Development
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #3 (permalink)  
Old 05-02-2008, 09:26 AM
What's Jailbreak?
 
Join Date: May 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

wrong code :P
edited..
permmisions 777
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #4 (permalink)  
Old 05-02-2008, 03:24 PM
NetMage's Avatar
Developer
 
Join Date: Aug 2007
Device + Firmware: iPhone 1.1.3
Operating System: Windows XP
Location: Virginia
Posts: 981
Thanks: 26
Thanked 161 Times in 134 Posts

I would put in a test or an NSLog to verify that the return from fopen is a valid pFile and not an error indication.
__________________
Starlight Computer Wizardry
Pocket-sized Development
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
  #5 (permalink)  
Old 05-02-2008, 05:06 PM
What's Jailbreak?
 
Join Date: May 2008
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

how do i do this?
Digg StumbleUpon Delicious Reddit Newsvine Google Yahoo Thanks Reply With Quote
Reply

  ModMyiFone.com - iPhone | iPod Touch forums, news, apps, themes. > 3rd Party Apps For iPhone | iPod Touch > iPhone / iPod Touch SDK | Development Discussion


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

ModMyMoto.com - ModMyGPhone.com - ModMyiFone.com - Managed Dedicated Servers by SingleHop - iPhone Wallpapers - Contact Us - Link to us - Archive - Privacy Statement - - Top
Copyright © 2007-08 by ModMy, LLC. All rights reserved. You may not copy anything on this site unless you link to the original.
All times are GMT -6. The time now is 12:40 PM. Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0 RC5
ModMyiFone.com is an independent publication and has not been authorized, sponsored, or otherwise approved by Apple, Inc or Cisco Systems, Inc. The information contained on this site is for educational purposes only.
Forum skin by poetic_folly