Search:

Type: Posts; User: skipper

Page 1 of 15 1 2 3 4

Search: Search took 0.02 seconds.

  1. Thread: namespace

    by skipper
    Replies
    11
    Views
    1,243

    It's been a while since I've been out here, volk,...

    It's been a while since I've been out here, volk, but a reasonably good response to your question can be found in Scott Meyers' book, Effective C++.

    Unless you're writing a paper, or something of...
  2. Replies
    4
    Views
    2,712

    I'm with PJ. At this level, use find(). ...

    I'm with PJ.

    At this level, use find().

    Also, investigate 'basic_string'. The member functions that you'll find will surprise/amaze you.

    (Why they're not used more often is a mystery to me,...
  3. Replies
    24
    Views
    2,798

    Chris, You should be eternally grateful for...

    Chris,

    You should be eternally grateful for the help you've received here.

    Between nextus and Speedy5 (nextus' code being more straightforward), your homework is done.

    A simple 'copy &...
  4. Replies
    8
    Views
    1,416

    Still have your "triangle" code somewhere on a CD...

    Still have your "triangle" code somewhere on a CD and I confess to doing some "scrambling" on that one. Very sweet.

    This one's playing it a little "closer to the vest", though, isn't it? :)

    Not...
  5. Replies
    8
    Views
    2,216

    Not to be a "wet blanket" here, folks, but this...

    Not to be a "wet blanket" here, folks, but this discussion might better be conducted on the General Discussion Board. ;)

    -Skipper
  6. Thread: Help!!!

    by skipper
    Replies
    2
    Views
    1,154

    Amy, You need to do a program on prime...

    Amy,

    You need to do a program on prime factors?

    Been done. Do a search. ;)

    -Skipper
  7. Thread: file i/o help

    by skipper
    Replies
    7
    Views
    1,195

    One possibility. If your file was created as...

    One possibility.

    If your file was created as a char array rather than a pure 'string', there would be a trailing '\0' character, or characters. This, of course, would signify the end of the...
  8. Thread: file i/o help

    by skipper
    Replies
    7
    Views
    1,195

    Sure. The EOF flag is not turned "on" until ...

    Sure.

    The EOF flag is not turned "on" until after the last character of the file is read, hence, your 'problem'. In short, your WHILE loop is going through one additional iteration accounting...
  9. Replies
    22
    Views
    7,132

    Poll: Biographies/History. I'm currently in the...

    Biographies/History.

    I'm currently in the middle of Robert K. Massie's Peter the Great. Shameful that I waited this long to read it. Excellent.

    (Okay, you "kids" can go back to sci-fi and...
  10. Minesweeper, I didn't see an answer to your...

    Minesweeper,

    I didn't see an answer to your question, so...

    No, the Marine Corps is not the President's "personal army".

    The Marine Corps, whether they like it or not, are subsidiary to the...
  11. void main()????? It's int main() and we leave...

    void main()?????

    It's int main() and we leave it to you to discover why.

    As Azuth points out, code tags. (Hammer will appear shortly...)

    Up to me, and I had to use a 'switch' statement? I'd...
  12. Replies
    3
    Views
    1,205

    Research the standard 'string' class. There are a...

    Research the standard 'string' class. There are a wide variety of 'find' and 'replace' member functions,as well as a 'swap' member function.

    I was educated to the fact that binary files are...
  13. Replies
    3
    Views
    101,930

    The example your text illustrates is the language...

    The example your text illustrates is the language from which the 'shortcut' version that hk_mp5kpdw provided is derived.

    Unless I'm mistaken, this is compiler-dependent, however. Borland supports...
  14. Replies
    7
    Views
    2,617

    alpha is right. ios::fixed is the key to your...

    alpha is right. ios::fixed is the key to your problem.

    setprecision() has "default" settings which are fine as long as you understand how they function. (It doesn't discriminate between the...
  15. Replies
    15
    Views
    3,282

    Agreed. (However, not with the spelling. :) ) ...

    Agreed. (However, not with the spelling. :) )

    Switch statements work with integral values only. Doesn't mean they're not "variables".

    Let's be careful of the 'basics'.

    It's incumbent upon...
  16. Thread: TELL me WHY!!!

    by skipper
    Replies
    14
    Views
    2,766

    Agreed with OneStiff on this one. May be a...

    Agreed with OneStiff on this one.

    May be a little too PC, but there are procedures, lest you end up sitting in an NLRB courtroom, or mediating with EEOC.

    Garbage, of course, but real world.
    ...
  17. Replies
    4
    Views
    1,108

    Actually, it does run. Depends on your compiler,...

    Actually, it does run. Depends on your compiler, though. MSVC++ automatically stops at the end of the execution.

    Borland, and others, need to be "forced" to stop with a "pause" statement of some...
  18. Replies
    72
    Views
    13,220

    Late in the game (so to speak): The Great...

    Late in the game (so to speak):

    The Great Escape
    Enemy At the Gates
    The American President
    Fort Apache
    Roman Holiday
    Lawrence of Arabia
    The Blue Max
    Twelve O'Clock High
  19. Replies
    15
    Views
    4,887

    >I can't see the attraction in fighting in a...

    >I can't see the attraction in fighting in a jungle - or even a desert for that matter.

    There is no attraction to war. Period. Two childhood friends were killed in Viet Nam. A couple of more got...
  20. Replies
    13
    Views
    2,792

    Fair enough. (Told you, Prelude, but,...

    Fair enough.

    (Told you, Prelude, but, noooo..."It's Christmas Eve, and not even I would be that 'nitpicky'!" Coal for Christmas, again! :D)

    Sorry, Ride -or- Die, you're right, of course. I...
  21. Replies
    15
    Views
    4,887

    My understanding is that 18-year-old's must still...

    My understanding is that 18-year-old's must still register with the Selective Service Commission (does it still go by that name?). My son did three years ago, anyway.

    As to the original question?...
  22. Replies
    13
    Views
    2,792

    Since handheld calculators were (literally)...

    Since handheld calculators were (literally) unheard of when I was in high school, I can't say that I can think of any programming teachers that were less-than-effective. (C++ was still on the drawing...
  23. Thread: Old code

    by skipper
    Replies
    7
    Views
    1,668

    Somewhere in Mr. Stroustrup's book it's suggested...

    Somewhere in Mr. Stroustrup's book it's suggested that declaring of variables should be done as near as practicable to where the variable is used in the code.

    Whether it lends itself to...
  24. Replies
    10
    Views
    1,938

    By way of information, a 'string' is a char...

    By way of information, a 'string' is a char array. Specialized, meaning more functional, but it's still a char array.

    Research the member functions of the 'string' class (basic_string) to see what...
  25. Replies
    8
    Views
    2,032

    Sounds to me like you may be looking more toward...

    Sounds to me like you may be looking more toward a 'deque' than a vector since you may want to 'push' and/or 'pop' at either end. (You just knew someone would throw some garbage into the game, didn't...
Results 1 to 25 of 363
Page 1 of 15 1 2 3 4