Click here to Skip to main content
15,920,801 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: An Algorithm !! Pin
Jomy John30-Sep-05 16:19
Jomy John30-Sep-05 16:19 
AnswerRe: An Algorithm !! Pin
Johann Gerell20-Sep-05 20:05
Johann Gerell20-Sep-05 20:05 
GeneralRe: An Algorithm !! Pin
Jomy John21-Sep-05 4:39
Jomy John21-Sep-05 4:39 
QuestionC++ Pointer To Pointer Pin
BlitzPackage19-Sep-05 14:57
BlitzPackage19-Sep-05 14:57 
NewsRe: C++ Pointer To Pointer Pin
prasad_som19-Sep-05 19:03
prasad_som19-Sep-05 19:03 
AnswerRe: C++ Pointer To Pointer Pin
VaporTrace19-Sep-05 20:09
VaporTrace19-Sep-05 20:09 
AnswerRe: C++ Pointer To Pointer Pin
John R. Shaw21-Sep-05 22:47
John R. Shaw21-Sep-05 22:47 
QuestionHow does this work? Pin
LiquidE_SA19-Sep-05 3:15
LiquidE_SA19-Sep-05 3:15 
Can someone please tell me how the following is possible?
How is it possible to cast a LeafTrieNode pointer to a "NonLeafTrieNode" pointer, like this?

<br />
p->ptrs[pos] = (NonLeafTrieNode*) new LeafTrieNode(suffix);<br />


The program works like this, but I don't know how it works, because "LeafTrieNode" isn't derived from "NonLeafTrieNode"

<br />
"lieaftrienode.h"<br />
<br />
#ifndef LEAF_TRIE_NODE_H<br />
#define LEAF_TRIE_NODE_H<br />
<br />
class LeafTrieNode<br />
{<br />
public:<br />
	LeafTrieNode(){};<br />
	LeafTrieNode(char*);<br />
<br />
private:<br />
	bool leaf;<br />
	char *word;<br />
	friend class Trie;<br />
};<br />
<br />
#endif<br />



<br />
"nonlieaftrienode.h"<br />
<br />
#ifndef NON_LEAF_TRIE_NODE_H<br />
<br />
#define NON_LEAF_TRIE_NODE_H<br />
<br />
class NonLeafTrieNode<br />
{<br />
public:<br />
	NonLeafTrieNode(){};<br />
	NonLeafTrieNode(char);<br />
<br />
private:<br />
	friend class Trie;<br />
	<br />
	NonLeafTrieNode **ptrs;<br />
	char *letters;<br />
	bool isLeaf;<br />
	bool endOfWord;<br />
};<br />
<br />
#endif<br />


-- modified at 9:54 Monday 19th September, 2005
AnswerRe: How does this work? Pin
RichardS19-Sep-05 5:56
RichardS19-Sep-05 5:56 
GeneralRe: How does this work? Pin
VaporTrace19-Sep-05 6:30
VaporTrace19-Sep-05 6:30 
GeneralRe: How does this work? Pin
RichardS19-Sep-05 8:01
RichardS19-Sep-05 8:01 
GeneralRe: How does this work? Pin
VaporTrace19-Sep-05 13:24
VaporTrace19-Sep-05 13:24 
GeneralRe: How does this work? Pin
RichardS20-Sep-05 5:36
RichardS20-Sep-05 5:36 
AnswerRe: How does this work? Pin
VaporTrace19-Sep-05 6:18
VaporTrace19-Sep-05 6:18 
GeneralRe: How does this work? Pin
Johann Gerell20-Sep-05 19:55
Johann Gerell20-Sep-05 19:55 
GeneralRe: How does this work? Pin
RichardS21-Sep-05 6:14
RichardS21-Sep-05 6:14 
GeneralRe: How does this work? Pin
Johann Gerell24-Sep-05 11:18
Johann Gerell24-Sep-05 11:18 
QuestionWininet : Cache problem Pin
JabraJabra18-Sep-05 20:50
JabraJabra18-Sep-05 20:50 
AnswerRe: Wininet : Cache problem Pin
RichardS19-Sep-05 6:13
RichardS19-Sep-05 6:13 
QuestionClass Family Tree? Pin
VaporTrace18-Sep-05 10:20
VaporTrace18-Sep-05 10:20 
QuestionDunamic type converstion. Please help? Pin
LiquidE_SA18-Sep-05 1:17
LiquidE_SA18-Sep-05 1:17 
AnswerRe: Dunamic type converstion. Please help? Pin
VaporTrace18-Sep-05 10:52
VaporTrace18-Sep-05 10:52 
GeneralRe: Dunamic type converstion. Please help? Pin
LiquidE_SA18-Sep-05 11:15
LiquidE_SA18-Sep-05 11:15 
GeneralRe: Dunamic type converstion. Please help? Pin
VaporTrace18-Sep-05 12:19
VaporTrace18-Sep-05 12:19 
GeneralRe: Dunamic type converstion. Please help? Pin
RichardS18-Sep-05 13:47
RichardS18-Sep-05 13:47 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.