jimblumberg's Profile User Rating: *****

Reputation: 4628 Guru
Group:
Mentors
Active Posts:
15,396 (7.43 per day)
Joined:
25-December 09
Profile Views:
77,913
Last Active:
User is offline Today, 07:35 PM
Currently:
Offline

Previous Fields

Country:
US
OS Preference:
Linux
Favorite Browser:
FireFox
Favorite Processor:
Who Cares
Favorite Gaming Platform:
Who Cares
Your Car:
Who Cares
Dream Kudos:
50
Expert In:
C/C++

Latest Visitors

Icon   jimblumberg has not set their status

Posts I've Made

  1. In Topic: getline(cin, string);

    Posted 29 Aug 2015

    Quote

    Yes, that much is obvious, what I mean is how it is defined in the code itself. What type is it?

    In this content ws is std::ws a manipulator.

    Jim
  2. In Topic: getline(cin, string);

    Posted 28 Aug 2015

    The '\n' character is the default for that optional third parameter, so you don't need to add it to the function.

    Mixing the extraction operator>> with getline() is problematic. The extraction operator leaves the end of line character in the input buffer that must be removed before you switch to getline(). The getline() by contrast extracts and discards the end of line character.

    Jim
  3. In Topic: simple work hours project issue

    Posted 28 Aug 2015

    What do you mean by "it breaks"?

    By the way the following may be part of your problem:

       int numberofemployees;
       int employee[numberofemployees][4];
    


    First you are using numberofemployees uninitialized, second array sizes must be compile time constants in C++. I suggest you consider using std::vector instead and you should also see about increasing your compiler warning level, it should be able to help you solve problems like this.


    Jim
  4. In Topic: Quick question in switch statement

    Posted 27 Aug 2015

    Quote

    Why not to use for loop instead?

    For what purpose?

    Jim
  5. In Topic: simple While loop question

    Posted 26 Aug 2015

    Quote

    thanks for your answer! so this basically changes all the characters from string s to string t until the \0

    The highlighted word is why I said the OP was partially correct. IMO the "until" means that it doesn't do anything with the end of string character ('\0'), which is incorrect. The loop in question copies the source string to the destination string up to and including the end of string character ('\0') not up to the end of string character. The end of string character is also copied to the destination string.

    Jim

My Information

Member Title:
Age:
Age Unknown
Birthday:
December 6
Gender:

Contact Information

E-mail:
Private

Comments

Page 1 of 1
  1. Photo

    mireille4U Icon

    30 Apr 2015 - 05:26
    Greeting from mireille i saw your profile today and i became interested in you and i will like to know more about you and if you can mail an email to my mail address (mireille4u@live.com) i will give you my picture.here is my mail address i hope we can move from here.above. Mireille
  2. Photo

    modi123_1 Icon

    17 Nov 2014 - 08:11
    I like brocken's comment "I don't know much about coding, but it would be really easy".
    Heh.. I don't know anything about the topic, but I know it is easy.
    Riiiiiiiiiight.
  3. Photo

    brockenglass101 Icon

    22 Oct 2014 - 02:34
    I know that this isn't what this site is for but many people in the pc gaming comunity have been looking for screen magnification program that would zoom in on the center of the screan rather then the cursor (turned on and off with a hotkey). Now, I am not going to lie, I don't know much about coding, but it would be really easy to make program like this one.
    I hope you will find ...
  4. Photo

    KnifeTea Icon

    11 May 2014 - 05:55
    thanks for the help Jim!
  5. Photo

    tarmizi_adam2005 Icon

    04 Dec 2013 - 07:15
    Just stopping by to say Hello Jim. I've learned quite a few things from your posts in the c/c++ forum.
Page 1 of 1