April 20, 2004
okay i get an error when trying to call a class method?!

class Node
{
//char[] value;
//Node* childen[10];

void Create( int depth, int curDepth )
{
//if( curDepth >= depth )
//	return;

//for( int i = 0; i < childen.length; i++ )
//{
//printf("hello!\n");
//children[i] = new Node();
//children[i].Create(depth, curDepth - 1 );
//}
}
}

int main( char[][] args )
{
Node root;
root.Create( 10, 0 );

return true;
}

am i doing something wrong?


April 20, 2004
Fabian wrote:

>okay i get an error when trying to call a class method?!
>
>class Node
>{
>//char[] value;
>//Node* childen[10];
>
>void Create( int depth, int curDepth )
>{
>//if( curDepth >= depth )
>//	return;
>
>//for( int i = 0; i < childen.length; i++ )
>//{
>//printf("hello!\n");
>//children[i] = new Node();
>//children[i].Create(depth, curDepth - 1 );
>//}
>}
>}
>
>int main( char[][] args )
>{
>Node root; //error
>  
>

root = new Node;

>root.Create( 10, 0 );	
>
>return true;
>}
>
>am i doing something wrong?
>
>  
>


-- 
-Anderson: http://badmama.com.au/~anderson/