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

Search:

Type: Posts; User: D_Drmmr

Page 1 of 80 1 2 3 4

Search: Search took 0.07 seconds.

  1. Re: Problem With Sleep() When drawing ananalog clock

    Don't know if threads are covered in the book, but a quick way to make the program update approximately each second is to run the loop in a thread.


    std::atomic<bool> stop(false);...
  2. Replies
    5
    Views
    361

    Re: GUI design in C++

    Well, no, because Windows Forms requires .Net and unmanaged C++ doesn't give you that.

    What do you miss?

    If you mean a nice looking GUI application, then yes that's possible in C++.
  3. Re: Problem With Sleep() When drawing analog clock

    Calling sleep pretty much puts your program (well, the thread that calls sleep) into a coma. It doesn't do anything until it wakes from its sleep. One important thing your program won't do while it...
  4. Re: MFC Proper usage of sending message to dialog to activate

    Why not just send the dialog a custom message to tell it to update the combo box contents? Or just add a member function to the dialog class that you call directly?
  5. Re: Data structure for text predictor using qwerty keyboard in c++

    You call a dictionary application a text predictor and then conclude from that example that a dictionary is a form of text predictor. Seems like circular reasoning to me.

    I would assume the...
  6. Replies
    8
    Views
    436

    Re: Hash table efficiency

    When you say 'hashtable size' do you mean 'number of buckets'?
    I think OP meant not knowing the maximum number of data elements to be stored ahead of time.

    What makes you say this is a bad idea?...
  7. Replies
    13
    Views
    692

    Re: Calling a function in AfxBeginThread

    ...and synchronize access to the string data member using a Critical Section.
  8. Re: Exit two-threaded program with user input?

    Mandatory reading: http://www.drdobbs.com/parallel/interrupt-politely/207100682
  9. Replies
    52
    Views
    6,210

    Re: IF-free conception.

    Are you benchmarking unoptimized code? That's not very useful.
  10. Re: Please help a newbie on CPP High Frequency Trading Example

    This might be a (premature) optimization trick to prevent branching due to the short-circuiting behavior of &&.
  11. Re: How can I create a template method in a C++ class?

    Look how much easier to read your code becomes with a few local variables. You should really stop copy-pasting source code; it's a very bad habit.


    template<class T>
    ObjectBase*...
  12. Replies
    27
    Views
    17,541

    Re: scrolling popup menu via Page Up/Down

    Yes, you could do that. but it sounds to me like a list box is better suited for your user interface. This would also allow the user to select an item by typing multiple characters, which is much...
  13. Replies
    3
    Views
    2,561

    Re: Dijkstra's algorithm C++ - 2 implementations

    I'm sure you can come up with a test case that fails the second algorithm.
    As to why the first one may be too slow: a std::set keeps all its elements sorted. Dijkstra's algorithm only needs to...
  14. Replies
    4
    Views
    1,427

    Re: Creating Matrix/map for Topological sort?

    That's basically the algorithm for finding a topological order. ;)
  15. Replies
    11
    Views
    984

    Re: namespace expert needed :-(

    That's because there is no specialization for 'implements_load' and 'implements_store'. Don't know if you removed this to get a minimal example or if they are missing in your actual code (maybe the...
  16. Replies
    11
    Views
    984

    Re: namespace expert needed :-(

    Compiles fine in VC9.
    What is the complete error message you get?
  17. Re: The Majority Are Ignoring Visual Studio 2012 and 2013

    Could you please remove this BULLSHIT? Ever heard of sampling bias?
  18. Replies
    10
    Views
    880

    Re: Fundamental question- C++ learner

    When we are allocating POD types, probably. But the overhead is constant, i.e. independent of sizeX and sizeY.

    However, for non-POD types I think my solution will use less memory for non-tiny...
  19. Replies
    10
    Views
    880

    Re: Fundamental question- C++ learner

    Assuming you use the code I posted above, you can access the data like this


    int x = 1, y = 2; // second row, third column
    values[x][y] = 1.23;

    [code]
    const int nRows = int(values.size());...
  20. Replies
    10
    Views
    880

    Re: Fundamental question- C++ learner

    That's not the same. decltype(pvalue) will be double*[4], not double**.

    I assume you meant "new double[sizeY]" inside the loop. This is also considered bad style. You perform sizeX + 1...
  21. Replies
    10
    Views
    880

    Re: Fundamental question- C++ learner

    AFAIK, this is invalid in C++11 just as it is in C++03. The call to new returns a double*[4], which is not convertible to a double**.
  22. Re: boost serialization of nested struct does not work in c++

    Could you please fix the compiler errors, such that people can just copy-paste the code if they want to run it?
    What about the serialization "does not work"?
  23. Replies
    47
    Views
    7,543

    Re: Ising Model C++ Metropolis Algorithm

    Please use code tags! Your code is practically unreadable without them.
    Did you step through your code with the debugger? What values are you getting for x and y?
  24. Replies
    47
    Views
    7,543

    Re: Ising Model C++ Metropolis Algorithm

    That's horrible. Why would you advice someone to use a macro for this? A simple text-replace can solve this without obfuscating the code.

    @OP Using two different names for the same variable will...
  25. Replies
    8
    Views
    3,372

    Re: How to convert CString to std::string?

    What do you mean with "doesn't work"?
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center