Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



        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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden


This email sent to 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>)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.