• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: How to access the value that a pointer is pointing to
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: How to access the value that a pointer is pointing to


  • Subject: Re: How to access the value that a pointer is pointing to
  • From: Phil Faber <email@hidden>
  • Date: Sat, 29 Apr 2006 22:19:52 +0100

        while(feof(fp1)==0)

{
// ** This is not legal code but shows what I'm trying to achieve here! **
oneByteASCII=(value of byte at pointer 'oneByte');


                // Write the byte
                fwrite(&oneByte,1,1,fp2);

                // Read next byte
                fread(&oneByte,1,1,fp1);
        }

I don't have any idea what are you trying to do in this loop - it reads an input file and write the same data to the output file, and you don't do anything with the ascii values :-)


Describe what are you trying to do, maybe Cocoa can do most of the work for you.

I'm actually writing to programme which will eventually compress files into (hopefully!) much smaller files than any other compression programme has achieved to date. Basically all I need to do is to be able to analyse the individual bytes of the original file, apply the logic I THINK will work and then write back the compressed file. There may well be ways to achieve the reading and writing in Cocoa (and, to be honest, I'd RATHER use Cocoa)! At the moment, the 'missing bit' is obviously the compression logic which is why the current code looks pointless!


Phil
Send instant messages to your online friends http://uk.messenger.yahoo.com _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden
  • Follow-Ups:
    • Mailing List for Cocoa Newbies / Absolute Beginners
      • From: Phil Faber <email@hidden>
    • Re: How to access the value that a pointer is pointing to
      • From: Ondra Cada <email@hidden>
    • Re: How to access the value that a pointer is pointing to
      • From: Ondra Cada <email@hidden>
References: 
 >-[NSAttributedString initWithData:...] compresses spaces? (From: Glen Simmons <email@hidden>)
 >How to access the value that a pointer is pointing to (From: Phil Faber <email@hidden>)
 >Re: How to access the value that a pointer is pointing to (From: Patrick Seemann <email@hidden>)
 >Re: How to access the value that a pointer is pointing to (From: Phil Faber <email@hidden>)
 >Re: How to access the value that a pointer is pointing to (From: Nir Soffer <email@hidden>)

  • Prev by Date: Re: Distributed objects: connecting to a process running as root?
  • Next by Date: Re: How to access the value that a pointer is pointing to
  • Previous by thread: Re: How to access the value that a pointer is pointing to
  • Next by thread: Re: How to access the value that a pointer is pointing to
  • Index(es):
    • Date
    • Thread