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

Managed C++/CLI

 
AnswerRe: GetClusterInformation is not working Pin
prasad_som12-Mar-07 1:53
prasad_som12-Mar-07 1:53 
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 
This is more on the mathematical side but I'm trying to convert metrics to english and vice versa.

I've got the main coding done but my equations are off. Maybe it's because I've been working on this for about 3 days straight and just cannot see what I'm doing wrong, OR I'm just have no clue as to what I am doing in the first place. LOL

here is the code I have for converting metric to english (grams and kilograms to pounds and ounces):

const double KILOGRAMS_PER_POUND = .454;
const double POUNDS_PER_KILOGRAM = 2.2046;
const double GRAMS_PER_KILOGRAM = 1000;
const double OUNCES_PER_POUND = 16;
const double GRAMS_PER_POUND = 453.59;



void convert_M_to_E( double £s, double& ounces, double grams, double kilograms)
// Parameters: Grams and kilograms values to be converted to pounds and ounces
// and references to variables that hold pounds and ounces
// Returns: None
// Calls: None
{ 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;

} // End of convert_M_to_E()


And here is the code I have to convert English to Metric:

void convert_E_to_M( double pounds, double ounces, double& grams, double& kilograms)
// Parameters: pounds and ounces values to be converted to grams and kilograms
// and references to variables that hold grams and kilograms
// Returns: None
// Calls: None
{ double total_pounds; // pounds and ounces converted to pounds
double total_grams; // pounds and ounces converted to grams

total_pounds = (pounds + ounces)/OUNCES_PER_POUND;
total_grams = GRAMS_PER_POUND * total_pounds;
grams = double (total_grams);
kilograms = grams/GRAMS_PER_KILOGRAM;
} // End of convert_E_to_M()

I know I've got it completely wrong... can anyone help??

Thanks,
Ruby
AnswerRe: calculating conversion question... Pin
Christian Graus11-Mar-07 10:52
protectorChristian Graus11-Mar-07 10:52 
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 

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.