DoNotWant's Profile User Rating: -----

Reputation: 11 Tradesman
Group:
Active Members
Active Posts:
59 (0.06 per day)
Joined:
03-November 11
Profile Views:
3,216
Last Active:
User is offline Feb 26 2014 04:29 AM
Currently:
Offline

Previous Fields

Country:
SE
OS Preference:
Windows
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
0
Icon   DoNotWant has not set their status

Posts I've Made

  1. In Topic: Strange behaviour when checking char input

    Posted 15 Feb 2014

    View Posttarmizi_adam2005, on 15 February 2014 - 08:17 AM, said:

    Hi,

    As Salem_c said,

    Quote

    Because floating point input understands exponentiation format.

    Like 1.23e+2 is really 123

    But if you don't type in the rest of it, then what ends up in unit is the \n of the end of input.
    You don't have a case for that, so it ends up as the default.


    try to run your program by inputting 1.23e+2e. This is equal to 123e which is what you really want. If you want to convert say 300 euros, you'll have to type in 3.0e+2e which will become 300e. Notice that the e in red is actually the exponential form and the e in green is the char unit from the user input.

    *EDIT*
    read jimblumberg post to understand why your input say, 12ee, 55es, or 32.2e y would not work.


    I were a little too fast when I first read jimblumberg's post, I get it now. Thanks!
  2. In Topic: Strange behaviour when checking char input

    Posted 15 Feb 2014

    View Postjimblumberg, on 15 February 2014 - 06:52 AM, said:

    Quote

    I thought so too at first, but shouldn't input like 12ee, 55es, or 32.2e y work then?

    What results did you get when you ran the program?

    "12ee" should produce 12.0, "55es" should produce 55.0, "32.2e y" should produce 32.2 all the extra characters will be left in your input buffer waiting for the next input operation.


    Jim


    I know, but all those things evaluate to the default case.
    I just tried compiling it with g++, and I get the same results.
  3. In Topic: Strange behaviour when checking char input

    Posted 15 Feb 2014

    I thought so too at first, but shouldn't input like 12ee, 55es, or 32.2e y work then?
  4. In Topic: Assembly on different processors

    Posted 26 Aug 2013

    You should also know that you have to think in different ways depending on CPU, not only different instructions. CPUs have different addressing modes, different amount of registers, status flags reacting differently to op-codes, e.t.c.
  5. In Topic: Deleting Object

    Posted 13 Aug 2013

    View Postjimblumberg, on 13 August 2013 - 12:03 PM, said:

    Quote

    You should change that NULL to nullptr.

    But remember that nullptr is only available with the C++11 standard, it doesn't exist in the C++98 standard.

    Jim


    Isn't using C++98 now like using something like Turbo C++ when C++98 were the standard? :P
    I know it's not THAT bad, but it's still in the same direction, right?

My Information

Member Title:
D.I.C Head
Age:
Age Unknown
Birthday:
Birthday Unknown
Gender:

Contact Information

E-mail:
Private

Friends

DoNotWant hasn't added any friends yet.

Comments

Page 1 of 1
  1. Photo

    simmu Icon

    27 Dec 2011 - 00:23
    hi
Page 1 of 1