Search:

Type: Posts; User: SKeane

Page 1 of 10 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    13
    Views
    1,274

    Clue: Look at the return value from...

    Clue: Look at the return value from games.erase(myIterator), you need to use it.
  2. Replies
    3
    Views
    931

    www.bruceeckel.com

    www.bruceeckel.com
  3. Thread: clear screen

    by SKeane
    Replies
    7
    Views
    1,182

    Read the FAQs

    Read the FAQs
  4. Replies
    13
    Views
    1,274

    Read #3 again, especially the bit about...

    Read #3 again, especially the bit about INVALIDATING ITERATORS.
  5. Thread: help

    by SKeane
    Replies
    3
    Views
    1,136

    google pthread

    google pthread
  6. Replies
    6
    Views
    1,307

    You are not doing anything with the answer the...

    You are not doing anything with the answer the user inputs (other than storing it).
  7. Replies
    5
    Views
    13,180

    When you send the message you are using...

    When you send the message you are using strlen(msg) rather than strlen(msg) + 1 (to include the terminatingNULL). You use strcpy() to move the message, but the "sender" didn't put a NULL on the end...
  8. Replies
    5
    Views
    13,180

    How are you getting the original message, user...

    How are you getting the original message, user input?

    Is your message actually "hello" + LF + NULL = 7?
  9. Replies
    2
    Views
    14,685

    Depends on the O/S but for Unix types try limits.h

    Depends on the O/S but for Unix types try limits.h
  10. Replies
    2
    Views
    1,019

    Use %f in your prinf for a double, not %d that's...

    Use %f in your prinf for a double, not %d that's for signed integers.
  11. Replies
    5
    Views
    1,664

    You might want to look up what a union actually...

    You might want to look up what a union actually is. Try to think of it as an OR. You can either look at the age OR you can look at the name. You can't use both at the same time in your example. If...
  12. Replies
    12
    Views
    16,310

    Thanks for the advice. I really should go down...

    Thanks for the advice. I really should go down the singleton route, but here's what I finally did.

    The DLL exports a whole class (the interface). This class' destructor calls a static "pseudo"...
  13. Replies
    12
    Views
    16,310

    The vector holds pointers to a specific class...

    The vector holds pointers to a specific class type. I'd assumed that delete'ing the pointer would call the appropriate destructor. I put a message in the destructor and if you specifically delete...
  14. Replies
    12
    Views
    16,310

    C++ static destructor

    Before I get flamed too badly, yes I know there isn't a C++ static destructor.

    What I'm after is a technique to clean-up after a class that consists entirely of static member functions and static...
  15. You are overloading the read_eles function....

    You are overloading the read_eles function. Rather than writing a whole new function, you just have to tell the exiting function whether you are interested in hitting EOF before sentinel (1st pass)...
  16. Replies
    4
    Views
    7,159

    Perhaps because it's #include ...

    Perhaps because it's



    #include <windows.h>


    Just a thought.
  17. Replies
    11
    Views
    21,259

    You might want to consider hiding the password...

    You might want to consider hiding the password when the user types it in. A search of these forums would yield several possible solutions, depending on your environment O/S etc.
  18. Thread: using clock()

    by SKeane
    Replies
    8
    Views
    2,979

    You are trying to subtract the value of a...

    You are trying to subtract the value of a variable set in the child process from a variable that is set in the parent process. They can't see each other's data. The child gets a copy of the parents...
  19. Thread: vector/list

    by SKeane
    Replies
    8
    Views
    1,109

    (In theory) if you plan on doing insertions into...

    (In theory) if you plan on doing insertions into the middle of a container then a linked-list would be quicker than a vector. Of course it depends on how the writer(s) of the STL actually implemented...
  20. Thread: switch question

    by SKeane
    Replies
    17
    Views
    1,760

    But if you are going to deliberately fall through...

    But if you are going to deliberately fall through different case statements, it's advisable to clearly comment it so that at a later date someone maintaining your code does "correct" your "mistake"...
  21. Thread: vector/list

    by SKeane
    Replies
    8
    Views
    1,109

    Think about what happens if you wish to insert...

    Think about what happens if you wish to insert something in the middle of a vector or the middle of a linked-list.
  22. Replies
    6
    Views
    1,400

    if (! names) { cout

    if (! names)
    {
    cout << "File not opened" << endl;
    }


    Do you really wish to continue if this happens?
  23. Replies
    11
    Views
    21,259

    #include #include #include...

    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #define name1 "denny"
    #define pass1 "123"

    int main(int argc, char *argv[])
    {
    char * name;
    char * pass;
  24. Thread: switch question

    by SKeane
    Replies
    17
    Views
    1,760

    int sumnum = 3; switch(sumnum) { case...

    int sumnum = 3;

    switch(sumnum)
    {
    case 1:
    // Do something for case 1 only
    break;
    case 2:
    // Do something for case 2 only
    break;
  25. Replies
    17
    Views
    1,621

    Your sandwiches have corners?

    Your sandwiches have corners?
Results 1 to 25 of 239
Page 1 of 10 1 2 3 4