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

  1. Replies
    30
    Views
    2,284

    Re: IF-free conception.

    Are you benchmarking unoptimized code? That's not very useful.
  2. 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 &&.
  3. 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*...
  4. Replies
    27
    Views
    13,567

    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...
  5. Replies
    3
    Views
    1,903

    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...
  6. Replies
    4
    Views
    1,075

    Re: Creating Matrix/map for Topological sort?

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

    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...
  8. Replies
    11
    Views
    709

    Re: namespace expert needed :-(

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

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

    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...
  11. Replies
    10
    Views
    639

    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());...
  12. Replies
    10
    Views
    639

    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...
  13. Replies
    10
    Views
    639

    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**.
  14. 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"?
  15. Replies
    47
    Views
    5,204

    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?
  16. Replies
    47
    Views
    5,204

    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...
  17. Replies
    8
    Views
    2,811

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

    What do you mean with "doesn't work"?
  18. Replies
    2
    Views
    439

    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.
  19. Replies
    2
    Views
    286

    Re: Best code for alert algorithm

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

    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...
  21. Replies
    8
    Views
    459

    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.
  22. Replies
    16
    Views
    963

    Re: question about sorting on bitstrings

    Yes, it's a possible way to tackle the problem. You can model the problem as a longest path problem by representing each (unique) input string as a node in the graph and adding edges between any pair...
  23. Replies
    16
    Views
    963

    Re: question about sorting on bitstrings

    That doesn't seem like an exact definition of the solution. You'll need to define formally what you mean with "longest possible runs". Is a solution with three runs of length 8, 5, 3 better or worse...
  24. Replies
    2
    Views
    378

    Re: std::map, insert() issue

    There is always std::make_pair(...) to prevent some repetition.

    I think in this case overload resolution would pick the non-template overload, so it would pick the (key_type, mapped_type)...
  25. Replies
    3
    Views
    553

    Re: Pass value from one function to another

    #include <string.h>

    I guess you wanted the <string> header.


    char filename[256];
    string n;
    string filelist;
    void CreateNew(ofstream & FileNew);
    void ReadNew(ifstream & FileGet);
Results 1 to 25 of 2000
Page 1 of 80 1 2 3 4


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center