Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: Pointers?

  1. #1
    New Coder
    Join Date
    Jul 2003
    Location
    Mexico City
    Posts
    38
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Pointers?

    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:
    Code:
    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!

  • #2
    Super Moderator
    Join Date
    May 2002
    Location
    Perth Australia
    Posts
    4,040
    Thanks
    10
    Thanked 92 Times in 90 Posts
    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 ?
    resistance is...

    MVC is the current buzz in web application architectures. It comes from event-driven desktop application design and doesn't fit into web application design very well. But luckily nobody really knows what MVC means, so we can call our presentation layer separation mechanism MVC and move on. (Rasmus Lerdorf)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •