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.09 seconds.

  1. 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...
  2. Replies
    8
    Views
    320

    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?...
  3. Replies
    13
    Views
    569

    Re: Calling a function in AfxBeginThread

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

    Mandatory reading: http://www.drdobbs.com/parallel/interrupt-politely/207100682
  5. Replies
    52
    Views
    5,581

    Re: IF-free conception.

    Are you benchmarking unoptimized code? That's not very useful.
  6. 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 &&.
  7. 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*...
  8. Replies
    27
    Views
    17,111

    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...
  9. Replies
    3
    Views
    2,436

    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...
  10. Replies
    4
    Views
    1,360

    Re: Creating Matrix/map for Topological sort?

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

    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...
  12. Replies
    11
    Views
    903

    Re: namespace expert needed :-(

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

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

    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...
  15. Replies
    10
    Views
    800

    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());...
  16. Replies
    10
    Views
    800

    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...
  17. Replies
    10
    Views
    800

    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**.
  18. 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"?
  19. Replies
    47
    Views
    6,931

    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?
  20. Replies
    47
    Views
    6,931

    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...
  21. Replies
    8
    Views
    3,160

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

    What do you mean with "doesn't work"?
  22. Replies
    2
    Views
    573

    Re: Some question about transformation

    That doesn't look like the rotation axis. When rotating about an axis, all point on the axis remain in the same location.
  23. Replies
    2
    Views
    346

    Re: Best code for alert algorithm

    Is there an RSS feed to get notifications?
    What kind of platform do you want to run on?
  24. Replies
    16
    Views
    2,899

    Re: Sorting parallel arrays in C++

    You could always call the algorithm with a pair of boost::zip_iterators. You'll need to write a custom (or generic reusable) comparator though, which is not so nice without having support for generic...
  25. Replies
    8
    Views
    710

    Re: Array of CString size checking

    In C++ I would recommend using this instead:


    template<typename T, size_t N>
    size_t arraySize(T(&)[N])
    {
    return N;
    }

    It's much harder to use incorrectly.
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