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

Reputation: 11 Tradesman
Group:
Active Members
Active Posts:
62 (0.05 per day)
Joined:
03-November 11
Profile Views:
3,686
Last Active:
User is offline Feb 10 2015 09:46 PM
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: String splitting problem

    Posted 10 Feb 2015

    Well, now I just feel stupid! ;)
    Thanks, I have no idea why I didn't do that from the beginning.
    I did come up with another solutiong while walking the dog tho.
    I added if (!iss) break; right before the push_back, but your solution is way cleaner.
  2. In Topic: Scope problem with linked list code

    Posted 10 Feb 2015

    Node current;
    
    for (Linkedlist::Node *current = ll.head; current != NULL; current = current->next)
    {
    os << current->data << " ";
    return os;
    }
    


    You don't have a default constructor for your node. Also, why does your loop initializer look like that?
    This will also always return after the first iteration.
  3. 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!
  4. 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.
  5. 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?

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