Results 1 to 6 of 6

Thread: recursive structure in VB...

  1. #1

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963

    recursive structure in VB...

    Is there any way to declare a structure in VB like C...
    struct Tree {
    struct Tree *LeftPtr;
    struct Tree *RightPtr;
    int data;
    }
    One of the component variables points to itself.
    Declaring a pointer to itself...
    Is it possible in VB?

    Your help is really appreciated...
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  2. #2
    AIS_DK
    Guest
    Instead of a structure, you could use classes.

    Me points to the class itself

  3. #3
    Lively Member
    Join Date
    Mar 2002
    Posts
    96
    Comparing C to VB is like comparing apples and oranges.
    VB does not use pointers and a struct is most similar to a class module or a basic module. Look at VB Help on modules.

  4. #4

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Thanx dude...
    Looks like I gotta reinstall the space consuming help file...
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

  5. #5
    Bouncy Member darre1's Avatar
    Join Date
    May 2001
    Location
    Peterborough, UK
    Posts
    3,828
    looks like a Type declaration ...

    i.e.

    VB Code:
    1. Public Type MyType
    2.    strName As String
    3.    intNo As Integer
    4. End Type
    Confucious say, "Man standing naked in biscuit barrel not necessarily ****ing crackers."

    Don't forget to format your code in your posts

  6. #6

    Thread Starter
    Fanatic Member jian2587's Avatar
    Join Date
    Aug 2000
    Location
    I bet u need a fusion powered shuttle to reach my place...
    Posts
    963
    Euk! Nope...
    Sort of dynamically changing a list size...
    If u learn C u should've know this in
    Data Structures chapter...
    ASM,C,C++,BASIC,VB,JAVA,VBS,HTML,ASP,PHP,mySQL,VB.NET,MATLAB
    Programming is fun, but only if you're not on a tight deadline
    So I consider all those working engineers sad people

    VB FTP class
    3 page PHP crash course
    Crash Course on DX9 Managed with VB.NET covering basics till terrain creation

Posting Permissions

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



Click Here to Expand Forum to Full Width