...

View Full Version : Pointers?



fraknot
10-22-2004, 05:00 PM
Hi.
Just finished a C program that sets a 'tree' data structure, that means, a struct with different data types inside of it and two pointers like this:


struct Tree{
char character;
struct Tree *Left;
struct Tree *Right;
};

Is there any way to do something similar in PHP? basically pointers? I was thinking about classes with references... but the manual says "References are NOT pointers".
Thanks!

firepages
10-22-2004, 05:52 PM
The bigger problem is that PHP does not have structures ala C , you can use classes to act for all intents and purposes as a basic structure and have other objects reference them by composition etc but despite PHP's origins you cant really map the C methodology directly to it.

Can you give an example of the sort of problem you are trying to solve ?



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum