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

Managed C++/CLI

 
GeneralRe: GetClusterInformation is not working Pin
programvinod12-Mar-07 2:24
programvinod12-Mar-07 2:24 
QuestionShow the hour of execution of a process Pin
abbd11-Mar-07 19:56
abbd11-Mar-07 19:56 
AnswerRe: Show the hour of execution of a process [modified] Pin
George L. Jackson12-Mar-07 6:34
George L. Jackson12-Mar-07 6:34 
Questionquestion in using TCHAR* Pin
Stick^11-Mar-07 17:20
Stick^11-Mar-07 17:20 
AnswerRe: question in using TCHAR* Pin
Mark Salsbery11-Mar-07 17:54
Mark Salsbery11-Mar-07 17:54 
GeneralRe: question in using TCHAR* Pin
Stick^11-Mar-07 19:16
Stick^11-Mar-07 19:16 
Questioncalculating conversion question... Pin
RubyM11-Mar-07 11:28
RubyM11-Mar-07 11:28 
AnswerRe: calculating conversion question... Pin
Christian Graus11-Mar-07 10:52
protectorChristian Graus11-Mar-07 10:52 
You've done a good job of asking a detailed question, and showing hte code you've written to try and solve the problem. However, it looks to me like C++ code, and not C++/CLI. Please ask in the right forum.


RubyM wrote:
double total_pounds; // Grams and kilograms converted to pounds
double total_grams; // Pounds and ounces converted to grams
total_grams = grams + kilograms / GRAMS_PER_KILOGRAM;
total_pounds = total_grams / GRAMS_PER_POUND;
pounds = int( total_pounds );
ounces = pounds/OUNCES_PER_POUND;


1 - NEVER declare your variables at the top, unless you use them right away. If this is actually C code, then you must do that, and you really are in the completely wrong forum.
2 - NEVER declare a variable without giving it a default value
3 - I do think you're doing the conversion wrong, but if your answer is only a little bit wrong, even double does not give exact answers.


Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

GeneralRe: calculating conversion question... Pin
RubyM11-Mar-07 12:17
RubyM11-Mar-07 12:17 
AnswerRe: calculating conversion question... Pin
lafleon12-Mar-07 12:19
lafleon12-Mar-07 12:19 
QuestionStatic linking to user-generated library in MSVC Pin
Still learning how to code11-Mar-07 4:46
Still learning how to code11-Mar-07 4:46 
AnswerRe: Static linking to user-generated library in MSVC Pin
Christian Graus11-Mar-07 5:14
protectorChristian Graus11-Mar-07 5:14 
GeneralRe: Static linking to user-generated library in MSVC Pin
Still learning how to code11-Mar-07 6:14
Still learning how to code11-Mar-07 6:14 
QuestionReferences and (re)building. Pin
Bartosz Bien10-Mar-07 13:11
Bartosz Bien10-Mar-07 13:11 
QuestionI need help for creating array [modified] Pin
thesad10-Mar-07 8:40
thesad10-Mar-07 8:40 
AnswerRe: I need help for creating array Pin
Christian Graus10-Mar-07 8:59
protectorChristian Graus10-Mar-07 8:59 
GeneralRe: I need help for creating array Pin
thesad10-Mar-07 9:17
thesad10-Mar-07 9:17 
AnswerRe: I need help for creating array Pin
Jeff J Anderson10-Mar-07 9:16
Jeff J Anderson10-Mar-07 9:16 
QuestionContextMenuStrip Pin
abbd10-Mar-07 8:31
abbd10-Mar-07 8:31 
QuestionRe: ContextMenuStrip [modified] Pin
abbd10-Mar-07 9:34
abbd10-Mar-07 9:34 
QuestionRe: ContextMenuStrip Pin
abbd10-Mar-07 10:09
abbd10-Mar-07 10:09 
QuestionMFC Regural DLL with C++ Managed Pin
Patrik Dufresne10-Mar-07 5:50
Patrik Dufresne10-Mar-07 5:50 
Questionerror of declaration Pin
abbd10-Mar-07 5:00
abbd10-Mar-07 5:00 
AnswerRe: error of declaration Pin
Christian Graus10-Mar-07 5:39
protectorChristian Graus10-Mar-07 5:39 
QuestionTreeNode Pin
abbd10-Mar-07 4:04
abbd10-Mar-07 4:04 

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.