|
-
Aug 17th, 2001, 02:15 PM
#1
Thread Starter
Member
In C++ you'd do something like:
Code:
struct Node
{
int data;
Node *right;
Node *left;
}
I think. Ported to VB, you could do this (without pointers, thank god):
VB Code:
Type TreeNode
DataAtNode As Variant
Dim RightN As Node
Dim LeftN As Node
End Type
But I hate data structures, especially involving pointers, so does anyone else have an opinion?
-
Aug 17th, 2001, 04:38 PM
#2
Fanatic Member
Info.
You can't Dim variables inside type blocks. So flburt1's code would become:
VB Code:
Type TreeNode
DataAtNode As Variant
RightN As Node
LeftN As Node
End Type
Laterz
Digital-X-Treme
Contact me on MSN Messenger: [email protected]
[VBCODE]Debug.Print Round(((1097) - ((55 ^ 5 + 311 ^ 3 - 11 ^ 3) _
/ (68 ^ 5))) ^ (1 / 7), 13)[/VBCODE]
-
Nov 3rd, 2002, 07:07 PM
#3
Frenzied Member
If you are trying to program a tree, here I have a suggestion...
Binary Tree Thread
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
-
Nov 3rd, 2002, 07:12 PM
#4
The picture isn't missing
uhhh.. the guy doesn't even visit the boards anymore, and this is more than a year old...
Remember, if someone's post was not helpful, you can always rate their post negatively  .
-
Nov 3rd, 2002, 07:19 PM
#5
Frenzied Member
Ooops...
I did not know that.. Sorry Buggy... I just searched for all who had problems with trees and see which I could help.
We miss you, friend...  Rest in Peace, we will take care of the rest of it.
[vbcode]
On Error Me.Fault = False
[/vbcode]
- Silence is the human way to share ignorance
Tec-Nico
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|