CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: HeartBreakKid

Page 1 of 20 1 2 3 4

Search: Search took 0.17 seconds.

  1. Replies
    0
    Views
    1,747

    Question on GetThreadTimes()

    I'm using the GetThreadTimes() API call to determine CPU utilization of a worker thread in my app. Everything is working fine when I test locally (on my single CPU development box), but when I test...
  2. Replies
    12
    Views
    985

    Re: Happy Birthday HeartBreakKid

    Missed this...... Thank you!


    Real name is Chad ;)
  3. Re: How to create an int with 2 numbers and store it in a vector? Won't work...

    From your code, it looks like you already have a structure for a card, in that case you could really simplify your code...




    struct Card
    {
    enum Suit {spade, heart, club, diamond}

    ...
  4. Replies
    3
    Views
    1,256

    Re: To convert string to int

    Have a look at this FAQ:

    http://www.codeguru.com/forum/showthread.php?t=231054&highlight=string
  5. Re: How to create an int with 2 numbers and store it in a vector? Won't work...

    // Not tested...

    #include <utility>
    #include <vector>
    using namespace std;


    pair<int, int> oneCard (0, 13)

    vector<pair<int, int> > deck;
  6. Replies
    11
    Views
    1,151

    Re: Freeing objects on free store memory

    ;)

    The OP wasn't immediately clear on what was needed. I had drafted three responses, checked the OP again, and deleted them before finalizing that one. :)
  7. Replies
    11
    Views
    1,151

    Re: Freeing objects on free store memory

    Please show how the objects in PR are allocated.


    Your code, specifically,


    PR[i].getPersNr()

    // and
  8. Re: What is the difference between char* p = "test" and char p[] = "test"?

    Shouldn't it really be:



    const char* const "test";


    The first const only applies to the char* p, so you cannot change its value, whereas the second const refers to the literal string test. ...
  9. Replies
    3
    Views
    700

    Re: for cycle (strange use)

    To my knowledge, this shouldn't work (shorthand):




    for(int x = 0, int y = 0; x < 5; ++x, ++y);



    The second int is unexpected (and unnecessary)
  10. Replies
    2
    Views
    1,945

    Re: Few Qs. on Circular Doubly Linked list

    I don't think anyone is going to do your homework for you, but it really is a pretty simple set of questions...

    Think it out, given that "list" always means the head (i.e. first element) in the...
  11. Replies
    48
    Views
    8,343

    Re: itoa replacement ALMOST perfect

    You're looking at it the wrong way.


    -2147483648 (min value)

    means 2147483648 NEGATIVE values (staring with -1)



    2147483647 (max value)
  12. Re: undefined reference to 'insert_member_function_here()'

    You haven't provided the implementation of any of the member functions. The reason you don't see errors for the others, is because you haven't called them.
  13. Replies
    12
    Views
    1,193

    Re: Accelerated C++ homework question

    Depends on the triangle.....





    // This one may be tricky

    *
    * *
  14. Re: how to do you handle pointer class members?

    Technically, you can:




    int* a[3];

    a[0] = new int[10];
    a[1] = new int[10];
    a[2] = new int[10];
  15. Replies
    8
    Views
    927

    Re: Design question...

    This thread no longer makes sense.

    Thread synchronization is only applicable if you have multiple threads operating on the data (same instances of the data in memory) at the same time.

    If you...
  16. Replies
    8
    Views
    927

    Re: Design question...

    I'm not sure you want to keep the 1:1 as a derived:base relationship (completely depends on the table layout).

    Take a simple table layout like this for instance:

    ZIP_MSTR (PK ZIP_CD)
    CUSTOMER ...
  17. Re: Interview Questions - pull off my hair... all of it

    I find it hard to believe that anyone is asking these questions in interviews anymore. If they're so worried about getting "good" candidates they should incorporate some sort of preinterview testing...
  18. Replies
    24
    Views
    1,790

    Re: Help!!!! Interview Question

    Exactly my point. Didn't catch the sarcasm?
    :p
  19. Replies
    3
    Views
    625

    Re: insert in file

    There is no way to insert into an existing file. You'll need to read in the file, insert/append your required data, and output the modified information to the file.
  20. Replies
    4
    Views
    606

    Re: Add a paired array to this code.

    Please use code tags. Also, this won't compile.
  21. Replies
    24
    Views
    1,790

    Re: Help!!!! Interview Question

    Wow, a real world question in an interview! :rolleyes:
  22. Replies
    16
    Views
    1,771

    Re: high value for int

    limits.h

    Or STL limit. std::numeric_limits
  23. Re: Code this 1 – 2^2 + 3^3 – 4^4 + 5^5 - ……

    I like it... If we do everyone's homework for them, we'll eventually have to do their job for them when they get to that point....
  24. Re: What happens to the pointer when a dialog box is closed?

    place


    delete this;


    In the dialog's PostNcDestory function. It would be cleaner if you put the Create() call in the constructor...
  25. Replies
    63
    Views
    86,485

    Re: Struct vs Class

    Assembly code has nothing to do with it as it is compiler specific. The standard notes no differences between the types (that we haven't already discussed).
Results 1 to 25 of 488
Page 1 of 20 1 2 3 4





Click Here to Expand Forum to Full Width

Featured