Printer Friendly Version
Email this thread to a friend
|
Are directories better than files? (In: Google)
Featured Web Site Template |
|
Reflects user activity within the last 5 minutes
|
|
| Member |
Message |
dlowhorn
Joined: Aug 09, 2005
# Posts: 1
|
Posted: 2005-Aug-10 00:59
I want to create a class and write the class to a binary file in one command and read the class back in one command. In C++, I might just make the << operator a friend of the class to do the printing, and for the binary file reading/writing, I could use sizeof() to get the size of the class to give to fseek to advance the pointer.
But the sizeof() php function doesnt seem to work the same way on php classes as I thought it might.
So...any thoughts on how to do either of these? Getting the size of a php class and overloading an output operation so I can print the entire class (or read it) at once?
|
 |
You are not permitted to post messages in this forum or topic, because of one or more of the following reasons:
- You have not yet logged in, or registered properly as a member
- You are a member, but no longer have posting rights.
- This is a private forum, for which you do not have permissions.
If you are a recent member, it's possible that you simply have not yet confirmed your account. Please
check your email for a message entitled 'JimWorld Forums: Confirm Your Account' and follow the instructions
contained within.
If you cannot find this message, click here to Re-Send it.
|
If you are still experiencing problem, please read the
Login Assistance
Article for some advice on what may be causing your login not to work properly.
|
Switch to Advanced Editor and ...
Create a New Topic
or Reply to this Thread
|
|