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

Managed C++/CLI

 
AnswerRe: fstreaming a whole object (pointer) Pin
Christian Graus10-Nov-05 12:49
protectorChristian Graus10-Nov-05 12:49 
GeneralRe: fstreaming a whole object (pointer) Pin
Hmmkk10-Nov-05 19:29
Hmmkk10-Nov-05 19:29 
GeneralRe: fstreaming a whole object (pointer) Pin
Christian Graus13-Nov-05 9:53
protectorChristian Graus13-Nov-05 9:53 
QuestionReading/editing registry on different .dat file? Pin
LordZoster9-Nov-05 11:40
LordZoster9-Nov-05 11:40 
Questionbinary hex conversion using stacks Pin
OttawaSenator9-Nov-05 6:57
OttawaSenator9-Nov-05 6:57 
AnswerRe: binary hex conversion using stacks Pin
mikanu9-Nov-05 7:12
mikanu9-Nov-05 7:12 
GeneralRe: binary hex conversion using stacks Pin
OttawaSenator9-Nov-05 11:10
OttawaSenator9-Nov-05 11:10 
GeneralRe: binary hex conversion using stacks Pin
mikanu10-Nov-05 16:32
mikanu10-Nov-05 16:32 
Well, when I first read your post my understanding was that you needed a pseudo-code version of the program. Hence my post...

So, issue number 1: the String class; Now, I'm not sure what language you're planning to use to implement this program so that makes your question a bit hard to answer without further clarification. In classical C++, if I recall correctly, there is the std namespace that I provides a string class (std::string) which should meet the requirement of the code snippet that I have shown above. If you are using a different version of C++ such as the Managed Extentions for C++ (which is really what I think this group should be about, given the "CLI" suffix) there is also a managed String class which is available in the System namespace.

Issue number 2: How to use the function. Basically all you would have to do in your program is call the Convert function as such (example in classical ANSI C++)


<code>
   std::string strBase2;
   std::string strBase8;
   std::string strBase16;

   // converting from base 10 to base 2:
   strBase2 = BaseConversion(no, 2);
   // display the result to the console
   printf("%d [Base 10] = %s [base 2]", no, strBase2);

   // converting from base 10 to base 2:
   strBase8 = BaseConversion(no, 8);
   // display the result to the console
   printf("%d [Base 10] = %s [base 8]", no, strBase2);

   // converting from base 10 to base 2:
   strBase16 = BaseConversion(no, 16);
   // display the result to the console
   printf("%d [Base 10] = %s [base 16]", no, strBase2);
</code>



but I really think that you need to first try to understand more basic concepts in order to be able to take advantage of these posts. Try googling for some tutorials on C++ first (look for basic stuff such as functions etc.), then look for some tutorials on data structures (you need to understand the stack and queue concepts at least).

P.S. the std namespace in C++ should also provide a stack class

-- modified at 22:40 Thursday 10th November, 2005
Question&quot;please help assignment due soon&quot; Pin
da_comp_learner7-Nov-05 16:07
da_comp_learner7-Nov-05 16:07 
AnswerRe: &amp;quot;please help assignment due soon&amp;quot; Pin
Christian Graus7-Nov-05 16:26
protectorChristian Graus7-Nov-05 16:26 
Questionmemory leak Pin
nineofhearts7-Nov-05 11:37
nineofhearts7-Nov-05 11:37 
AnswerRe: memory leak Pin
Christian Graus7-Nov-05 12:25
protectorChristian Graus7-Nov-05 12:25 
GeneralRe: memory leak Pin
nineofhearts7-Nov-05 13:21
nineofhearts7-Nov-05 13:21 
GeneralRe: memory leak Pin
Christian Graus7-Nov-05 13:41
protectorChristian Graus7-Nov-05 13:41 
GeneralRe: memory leak Pin
Christian Graus7-Nov-05 13:47
protectorChristian Graus7-Nov-05 13:47 
GeneralRe: memory leak Pin
nineofhearts7-Nov-05 15:59
nineofhearts7-Nov-05 15:59 
GeneralRe: memory leak Pin
Christian Graus7-Nov-05 16:02
protectorChristian Graus7-Nov-05 16:02 
GeneralRe: memory leak Pin
Kevin McFarlane13-Nov-05 4:22
Kevin McFarlane13-Nov-05 4:22 
AnswerRe: memory leak Pin
Joe Woodbury11-Nov-05 20:19
professionalJoe Woodbury11-Nov-05 20:19 
QuestionCallback with &quot;object&quot; parameter fails Pin
TriLogic7-Nov-05 10:39
TriLogic7-Nov-05 10:39 
QuestionC++ console Pin
iamboy7-Nov-05 9:05
iamboy7-Nov-05 9:05 
AnswerRe: C++ console Pin
Christian Graus7-Nov-05 9:50
protectorChristian Graus7-Nov-05 9:50 
QuestionAccessing control from another file Pin
Eran6-Nov-05 22:49
Eran6-Nov-05 22:49 
AnswerRe: Accessing control from another file Pin
Christian Graus7-Nov-05 9:53
protectorChristian Graus7-Nov-05 9:53 
Questionfstream help Pin
afrodriguez6-Nov-05 15:54
afrodriguez6-Nov-05 15:54 

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.