Im using xcode 4.6 and im having problems reading files using the fopen function in c

Im using xcode 4.6 and im having problems reading files using the fopen function in c

Yes, but that would not cause the "build  failed" message.
right I missed that part. Looks like two problems then.
//  main.m
//  ASCTestFopen
//  Created by Frank Caggiano on 3/2/13.
//  Copyright (c) 2013 Frank Caggiano. All rights reserved.
#import <Foundation/Foundation.h>
#include <stdio.h> 
int main(int argc, const char * argv[])
    @autoreleasepool {
        FILE *fp, *fopen();
        // insert code here...
        if((fp = fopen("~/test.txt","r")) == NULL)
            NSLog(@"open failed");
    return 0;
This will compile ad run in Xcode with a project type of comand line tool

Similar Messages

  • I am having problems downloading files from the web. After a number of files are downloaded, the system become sluggish, and then hangs. I traced the problem to the download history file: downloads.sqlite.

    After downloading a number of 1.0 MB files, the system became very sluggish, and I started to get lots of (Not Responding) messages when trying to download or just use Firefox for browsing. Using Performance Monitor, I observed that the Firefox executable was growing larger and larger - up to as large as 1.2 GB on a system with 2.0 GB memory. Page faults were off the chart.
    Looking for a similar problem, I found one that discussed the downloads.sqlite file becoming corrupted. I first noticed that this file was over 600 MB in size, so I deleted it. I then downloaded additional files, and observed that the new downloads.sqlite file would increase in size by about 150% of the size of each file that was downloaded. Once it would get up to 500 MB in size, the system started slowing down again.
    I don't know the purpose of this file, but it appears that it keeps a full copy of every file downloaded, which may be the function of a download history file, but it does not seem correct that the file should grow in size without limit, and thus impact the system.
    I would also appear that the Firefox executable is trying to read the entire contents of this file each time a new file is downloaded, which does not seem right.
    Temporary fix is to periodically delete the downloads.sqlite file when it gets too large and starts impacting performance.. Apparently it is smart enough to open a new file if the old one is not found. I am not sure what the correct behavior for this file should be. Apparently is does not re-initialize when a new Firefox session is initiated.
    Please feel free to contact me if more information is desired. I'm not sure what details you might need to troubleshoot this type of problem.

    Hi Katy, and a warm welcome to the forums!
    What is the exact name of the file?
    Is it aim.bin?
    Which requires either Stuffit Expander, or the Unarchiver to deflate.
    http://www.apple.com/downloads/macosx/systemdiskutilities/theunarchiver.html

  • I am using QuickTime 7 Pro and want to loop my video.  The Loop function is grayed out.  Why?  How can I loop my video?

    I am using Quicktime 7 Pro on a Max Mini to play my video on a gallery monitor.  Under View, the Loop option is grayed.  Why?  I need to play the video in a continuous loop all day.  Thank you.

    Loop appears to be "broken" in QuickTime Player Pro and 10.7.4.
    It's been fixed in 10.8 and also works in QuickTime 10, 10.1 and 10.2.
    Use 10.1 on your machine if you need to loop your playback.

  • Having problems reading checkbox using $(item).value

    Is this the correct way to get the value of a checkbox using javascript
    var rem = 'P525_REMOVE_TEST';
    var isRem = $x(rem).value;
    alert(isRem);
    The checkbox return value is 'YES'
    I am getting undefined. What am I doing wrong?
    Howard

    Hi,
    Check box will return data only if it is checked otherwise it will return null.
    Put this code in "HTML Form Element Attributes" of your check box
    onchange="if (this.checked ) { alert(this.value);} else {alert('not checked')};"Regards,
    Manish

  • I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or atleast maintain the charg over longer periods of time? I have a dc adapter. thanks

    I am using my Ipad on a remote craftshow site and am having problems with battery lasting 8 hrs. Can I use a 12v rv battery to recharge it or at least maintain the charge over longer periods of time? I have a dc adapter. thanks

    You should be able to use the battery if you get a car type charger which recharges mobile devices.
    The full size iPads use a 10-12W charger, whereas the mini uses a 5W charger. Many car chargers only supply 5W. But at 5W, the car charger should give you some extra time on your iPad. It would be best to use a 10-12W car charger.
     Cheers, Tom

  • I use only two channels, have plenty of memory in my hard disk, and external hard drive, no effects, and still having problems with Garage band. Giving messages as you have too many live channels

    I'm frustrated, I am doing everything you recommend, I use only two channels, have plenty of memory in my hard disk, and external hard drive, no effects, and still having problems with Garage band. Giving messages as you ave too many live channels, the disk is slow prepare...can you help?

    Quote from: Richard on 15-November-07, 20:33:05
    tornado2003,
    What you need to do is boot into Safe Mode. Then delete the VGA Drivers.
    After that boot normally and install the latest nVidia ForceWare Drivers
    Take Care,
    Richard
    i guess you missed that:
    Quote from: tornado2003 on 15-November-07, 17:26:52
    ive tryed booting xp in safe mode but it just freezes after it loads up a couple of needed files .
    ive even formatted my hard drive and tryed installing a fresh xp on it but it just keeps locking up when it gets to the "starting windows setup" .(this is just after it loads all the drivers from the xp cd)

  • I'm using iweb 3.4 and trying to load audio files to my web page.  everything looks good in iweb but after publishing instead of having a control bar i have a "?".  does anyone know what to do?

    I'm using iweb 3.4 and trying to load audio files to my web page.  Everything looks good in iweb but after publishing instead of having a control bar i have a "?".  Does anyone know what to do?

    Where are you hosting the site, how are you uploading the files and what's the URL of your site so we can examine it first hand?
    Adding audio files by dragging onto the web page forces the viewer to have Quicktime installed on their computer in order to be able to listen to them.  Look at the audio player options on this page of Roddy's iWeb for Musicians site: Audio Players for your Music Website. 
    OT

  • I am using both PSE 13 and Lightroom 5.  When I use Lightroom as an external editor and save the photo, it shows up in PSE13 as an edited file but does not look any different.  Why doesn't it appear edited?

    I am using both PSE 13 and Lightroom 5.  When I use Lightroom as an external editor and save the photo, it shows up in PSE13 as an edited file but does not look any different.  Why doesn't it appear edited?

    People who have Photoshop, but don't have Lightroom, need ACR so that they can use Raw files. Without ACR they could do nothing with those (they may also like having ACR so that they can work on other kinds of image using the same kinds of adjustments and techniques, as are used with Raw files).
    People who have Lightroom, can get access to Raw files regardless whether ACR is present or not. They can use Lightroom on other kinds of image also, using the same methods. LR can pass images directly into Photoshop without passing via ACR (or else does so transparently, which amounts to substantially the same thing).
    ACR does not, strictly speaking, even need to be installed for this external editing to happen. In fact, not even PS needs to be - since a different image editor can be used instead, while still retaining the Adobe Raw conversion etc.
    Lightroom "subcontracts out" specialised external tasks, in this workflow, but is still your "main contractor": the image is otherwise located, viewed, managed, adjusted/presented and output entirely using LR.
    So IMO we can divide image processing into:
    operations that involve pixels and layers and layer masks and adjustment layers etc (of the kind done inside Photoshop)
    operations that involve parametric edits (of the kind done in ACR where you are not using a Lightroom based workflow; otherwise, done inside Lightroom)
    When PS is called in, that's because those tasks are impossible or unsuitable to do in Lightroom. But those tasks can't be done in ACR either - by definition, since LR and ACR have exactly the same image processing "feature set".
    Lightroom is irrelevant to the Bridge + ACR + PS workflow. This workflow requires both your PS and your ACR to be current enough, to support your Raw format etc.
    ACR and Bridge are irrelevant to the LR + (image editor) workflow. It is in this case, only LR which needs to be current enough to support your Raw format etc.
    RP

  • HOW DO YOU TURN OFF "FIREFOX PREVENTED THIS PAGE FROM AUTOMATICALLY RELOADING". I did the "see Advanced - General - Accessiblity. and still having problems

    HOW DO YOU TURN OFF "FIREFOX PREVENTED THIS PAGE FROM AUTOMATICALLY RELOADING". I did perform the "see Advanced - General - Accessibility. It worked for me and my "user" site (don't know how to say my site) and still having problems with my wife's. I have gone to OPTIONS → GONE TO → ADVANCE and CLICKED THE LINE → ""Warn me when websites try to redirect or reload the page…""
    This did not rememdy the problem. I did try to get on the other site suggested
    http://kb.mozillazine.org/Accessibility.blockautorefresh
    but got a 404 error...
    I have googled the "ff prevented...." and after a number of hours searching I still have not found a fix...
    REALLY HOPE SOMEONE CAN HELP ME....
    JM

    You should still disable this setting:
    *Firefox > Options/Preferences > Advanced > General : Accessibility : [ ] "Warn me when web sites try to redirect or reload the page"
    The setting in "Options > Advanced > General" is meant as an accessibility feature, as you can see by the label of that section, so that people with disabilities or people who use screen readers do not get confused and is not meant as a safety protection to stop redirecting.
    What is the value of the <b>accessibility.blockautorefresh</b> pref on the <b>about:config</b> page?
    *http://kb.mozillazine.org/accessibility.blockautorefresh
    If you have problems with preferences, see:
    *http://kb.mozillazine.org/Preferences_not_saved
    Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem.
    *Switch to the DEFAULT theme: Firefox/Tools > Add-ons > Appearance
    *Do NOT click the Reset button on the Safe Mode start window
    *https://support.mozilla.org/kb/Safe+Mode
    *https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes

  • I have an Ipad 2 and are having problems sending out emails in one of my email address. I always get a message reading the email was not sent because the server does not allow relaying. This is an email account POP3. I have no such problem with gmail.

    I have an Ipad 2 and are having problems sending out emails in one of my email address. This is a POP3 email Account? I always get a message reading that the email was not sent because the server does not allow relaying. I have no such problem with gmail. What could be the problem and how do I resolve this. Is it about settings?
    Richard.

    Welcome to the Apple community.
    If you are unable to remember your password, security questions, don’t have access to your rescue address or are unable to reset your password for whatever reason, your only option is to contact Apple ID Support, upon speaking to an operator you should explain that your problem is related to your Apple ID, this way you will not be charged for assistance, even if you don’t have an AppleCare plan.
    The operator will take you through some steps you may have already tried, however they need to be sure they have exhausted all usual approaches before trying to reset your account, so you should try to be helpful and show patience with the procedure.
    The operator will need to verify they are speaking to the account holder and may ask you some questions that only the account holder could know, and you will need to answer them if the process is to proceed.
    Once the operator has verified your identity they will send a message through to your device which contains an alpha numeric code, which you will need to read back to them.
    Once this has been completed they will send an email to your iCloud email address after a period of 24 hours, so you should check that mail is enabled in your devices iCloud settings.
    Upon receipt of the email, use the reset link provided to reset your password, after which you should be able to make the adjustments to iCloud that you wish to do.

  • I am having problems attaching files to my email using the latest Firefox 13.0.1, Comcast is my internet provider, but I did not have problem with Safari.

    Why am I having problems attaching files to my email using Firefox 13.0.1.?
    I am using a MAC, OS 10.6.8, and have Comcast as my internet provider. I noticed after I upgraded to Firefox 13.0.1 that I am having problems attaching files to my email. I do not experience the same problem with Safari, but I prefer to use Firefox, as all of my bookmarks and passwords are saved there. I just like the way Firefox works better than Safari.
    I am a free-lance graphic designer and rely on my internet connection to my customers. I need this resolved ASAP!

    Could you start by resetting the zoom level on the page? To do that, you can either:
    * Press Ctrl+0 (that's a zero) on the keyboard
    * View menu > Zoom > Reset
    You also can use zoom to increase/decrease the size from there. This article describes the various mouse, keyboard, and menu methods: [[Font size and zoom - increase the size of web pages]].
    Any luck?

  • I'm trying to install a Citrix XenApp for work purposes and am having a hard time. The message "The installer has insufficient priveleges to this directory...

    I'm trying to install a Citrix XenApp for work purposes and am having a hard time. The message "The installer has insufficient priveleges to this directory: C:\Program Files (x86) \Mozilla Firefox \Plugins \resource. The installation cannot continue. Log on as administrator or contact your system administrator." I am using a Toshiba Satellite laptop and am the only user and administrator as well. I have read other Firefox support articles and google answers but nothing has resolved this issue. Please help! Be detailed and visual if possible

    There are no BIOS settings, because Macs don't have a BIOS. I don't use Parallels, but I assume it has simulated BIOS settings. You'd have to consult its documentation to find out how to change them.

  • We recently purchased the iphone5 (2) and are having problems with sound coming thru the earbuds when we plug them in to the iphones.  works fine with the ipad.  help please

    recently purchased the iphone5 (2 of them) and are having problems with the earpods.  no sound when plugged in to the iphone.  both phones.  works with the ipad.  help please

    Hi P5052,
    Welcome to the Support Communities ... and congratulations on the purchase of your iPhone 5's!
    It is very unusual that neither phone is working with the new earpods. 
    Have you tried a different headphone just to see if the issue is with the earpods or the iPhones?
    The article below will give you the basic troubleshooting steps for this issue.
    Click on the link below to see more details and screenshots. 
    I've quoted some helpful highlights for you:
    iPhone: Can't hear through the receiver or speakers
    Symptoms
    When someone calls, I can't hear them through the receiver or speaker phone, and I can't hear music through the speaker. I also can't be heard by someone who is calling me.
    Note: iPhone has one speaker, which is adjacent to the dock connector. On iPhone 4 or later models, the speaker is to the right of the dock connector. On earlier iPhone models, the speaker is to the left of the dock connector.
    Resolution
    Verify that there is nothing plugged in to the headset jack, including headsets, headphones, or adapters.
    Make sure the Ring/Silent switch is not switched to silent.
    While on the Home screen, adjust the volume buttons. If you see the icon below, indicating that headphones are attached, there may be debris or an object lodged in the headset jack:
    Check the headset jack. If there is an object lodged in the headset jack that is not easily removed, have the iPhone serviced to remove object.
    For Original iPhone: If there is light debris, such as lint, in the headset jack, try connecting a pair of headphones to the headset jack and then remove the headphones. Repeat this several times to remove the debris.
    If you have installed a protective film on the display, either ensure that the receiver is not covered or remove the film completely.
    Check the receiver mesh (which is on the top front of the device, above the display). If it appears blocked, use a clean, small, dry, soft-bristled brush to carefully and gently brush away any debris.
    If you have paired with a Bluetooth headset that is nearby, either use the headset or turn Bluetooth off (chooseSettings > General > Bluetooth).
    Restart the iPhone.
    If restarting the iPhone doesn't resolve the issue, try restoring the device.
    If the issue persists, go to the Service Answer Center - iPhone for information on service.
    Hope this helps!
    - Judy
    <Edited by Host>

  • How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    How can I get a pdf. to open in Safari, all i'm getting is a new window with a black, blank page, instead of the pdf., and I don't want to save the file to the desktop, Safari didn't use to do that, and I don't have Adobe in the internet plug in folder.

    Hi
    Please take a look to this thread Re: Can I refresh the browser rather than open a new tab?

  • I am using MS Office 2010 and Windows XP Professional, can I use iCloud for backup of my files and documents?

    I am using MS Office 2010 and Windows XP Professional, can I use iCloud for backup of my files and documents? I am planning to transition to a Mac so using the iCloud seems to make the most sence.

    No, it is not a backup method at all.  If you delete a sync'd file on any device, you delete it permanently from iCloud.  That by its very essence is not a backup solution therefore.  A backup solution does not automatically and simultaneiously delete the file everywhere when it is deleted from the original source.
    iCloud is strictly a syncronization tool for using files on multiple internet connected devices.

Maybe you are looking for