Thread: Show a number in the MessageBox

  1. #16
    Registered User
    Join Date
    Dec 2007
    Posts
    385
    I found out a solution to put numbers in 2 textboxes, using a button to add these numbers and show the result in a label in C++ doing this. So a conversion to string is made as oogabooga said also:
    Code:
    double Number1 = double::Parse(textBox3->Text);
    double Number2 = double::Parse(textBox4->Text);
    double result = 0;
    
    result = Number1 + Number2;
    resultlabel->Text = result.ToString();
    I am using little of both C# and C++ to see the differences. My application is very dependant of fast calculations and thats why I really cant let go of C++ yet.

  2. #17
    C++まいる!Cをこわせ!
    Join Date
    Oct 2007
    Location
    Inside my computer
    Posts
    24,654
    You realize that using C++ dot net (that's what you do when using your fancy GUI) will be much slower than using Native C++, too, right?
    Quote Originally Posted by Adak View Post
    io.h certainly IS included in some modern compilers. It is no longer part of the standard for C, but it is nevertheless, included in the very latest Pelles C versions.
    Quote Originally Posted by Salem View Post
    You mean it's included as a crutch to help ancient programmers limp along without them having to relearn too much.

    Outside of your DOS world, your header file is meaningless.

  3. #18
    - - - - - - - - oogabooga's Avatar
    Join Date
    Jan 2008
    Posts
    2,808

    Console app?

    My previous post was mistaken. Sorry about that.
    At this point I would agree with Elysia's previous recommendation of a console application, especially if Coding is just learning C++. If I wanted a program to read in some numbers, do an extremely long calculation, and output a numeric result (perhaps to a file), I would definitely use a console. Good enough, so to speak.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Link List math
    By t014y in forum C Programming
    Replies: 17
    Last Post: 02-20-2009, 06:55 PM
  2. Need help with this compiler error
    By Evangeline in forum C Programming
    Replies: 7
    Last Post: 04-05-2008, 09:27 AM
  3. adding a number to a number
    By bigmac(rexdale) in forum C Programming
    Replies: 11
    Last Post: 10-24-2007, 12:56 PM
  4. scanf oddities
    By robwhit in forum C Programming
    Replies: 5
    Last Post: 09-22-2007, 01:03 AM
  5. Random Number problem in number guessing game...
    By -leech- in forum Windows Programming
    Replies: 8
    Last Post: 01-15-2002, 05:00 PM