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

Search:

Type: Posts; User: lucky6969b

Page 1 of 28 1 2 3 4

Search: Search took 0.04 seconds.

  1. Re: Just wondering what the equivalence of this method is for C++?

    Thanks for helping buddy...
    Jack
  2. Just wondering what the equivalence of this method is for C++?

    public static float signum(float f) {
    return (f == 0.0f || Float.isNaN(f))?f:copySign(1.0f, f);
    }

    It comes from Math.signum of Java.
    I want to manipulate some numbers based on the same...
  3. Operator overload method not called

    I've got an interface that provides the methods that are to be implemented


    class A {
    virtual void A() = 0;
    }

    class B : public A {
    std::string operator<<(const...
  4. Re: Upon checking the emptiness of an array, I'm getting an unexpected result

    Solved it myself... It should look something like this...
    Thanks


    NodePoolNode* node = NULL;
    if (usedNodes.find(key.str()) != usedNodes.end()) {
    // found
    node =...
  5. Re: Upon checking the emptiness of an array, I'm getting an unexpected result

    I found the culprit...
    Looks like this member variable


    std::map<std::string, NodePoolNode*> usedNodes;

    usedNodes.insert(std::make_pair(key.str(), node));

    inserts NULL nodes into the...
  6. Upon checking the emptiness of an array, I'm seeing an unexpected result

    node = pool.at(0) is executed even though pool is empty,
    I even tried pool.size() == 0, that line is still executed.
    What is the reason, I wonder?
    Thanks
    Jack



    NodePoolNode*...
  7. Re: How to make a std::map return null when there is nothing "at" a certain position?

    Thanks, I think about it that way, just wondering if there are any alternatives.
    So you've confirmed me about this.
    Thanks a lot
    Jack
  8. How to make a std::map return null when there is nothing "at" a certain position?

    std::map<int, DWORD> unitColors;
    DWORD color = unitColors.at(unit->id);


    I want to use a color value of 0x00000000 when
    a DWORD at unit->id of unitColors is unavailable.
    Is it possible?...
  9. Re: What is the best matching data structure for C# binary heaps in C++ with boost?

    Hi,
    When I setup a priority_queue for this purpose, the only thing lacking is something like

    pq.erase(element);

    I can push it, pop it, top it but never erase a certain element in the middle of...
  10. What is the best matching data structure for C# binary heaps in C++ with boost?

    I wonder are there boost available structures that act pretty much the same as binary heaps of C# in VC++?
    like this code snippet in C#



    BinaryHeap<Node> OpenList = new BinaryHeap<Node>();
    ...
  11. Re: How to return a multidimensional array?

    If I return a copy of the array, this also didn't compile


    Node[60][60] GetNodeMap() { return m_Nodes; }

    Nor this


    Node[][] GetNodeMap() { return m_Nodes; }
  12. Re: How to return a multidimensional array?

    Error: return value type doesn't match the function type
    I don't get an error code though.
    The m_Nodes is underlined. And also I have left out the const identifier as well.
    Thanks
    Jack
  13. How to return a multidimensional array?

    I have put aside C++ for a while. And I am back to it.
    I forgot how to return a 2 dimensional arrays from a method?


    Node** GetNodeMap() const { return m_Nodes; }

    private:
    Node...
  14. Replies
    1
    Views
    191

    What is a binary heap?

    I've seen in one of C++ examples (Pathfinding) I've obtained that makes use of a structure of binary heap.
    What exactly is this type of structure?
    Are there any boost helper that represents this...
  15. Re: Adding a framework like MFC to Visual C++ express with resedit as the resource ed

    This isn't a problem, but out of curiosity...
    Does VS2013 not support unmanaged C++?
    Thanks
    Jack
  16. Adding a framework like MFC to Visual C++ express with resedit as the resource editor

    I have added resedit as my default resource editor.
    But there isn't any framework to work with.
    Are there any good frameworks out there which resemble MFC or QT or the like
    I miss the Class wizard...
  17. Replies
    1
    Views
    232

    Member variable persistence question

    LRESULT CALLBACK WndProc
    (HWND hwnd, UINT message, WPARAM wParam, LPARAM lParam)
    {
    static Controller* pCtrl;

    switch (message)
    {
    case WM_CREATE:
    try
    {
  18. Why is there no effect on the Add operation?

    The count was 22 before the addition, after the operation, the count is still 22.

    The platform is on asp.net, windows 7.
    No MVC



    protected void OnAddRecord(object sender, EventArgs e)
    ...
  19. What is the correct way of calling a self-contained posix thread in VC++?

    pThread turns out to be NULL here.
    Wondering what the correct way is...
    Thanks
    Jack



    class CPF_Thread
    {
    public:
  20. Replies
    5
    Views
    337

    Re: [del..............]

    Larger scope is here


    void Grid::initializeNeigbours() {
    for (int x = 0; x < columns; x++) {
    for (int y = 0; y < rows; y++) {
    GridNode* node = grid[x][y];
    std::vector<GridNode*>...
  21. Replies
    5
    Views
    337

    Re: Cannot catch C runtime exception

    Dear Mr Moderator,
    Can you bring up this thread again? I can't edit the thread title...
    Thanks
    Jack
  22. Replies
    5
    Views
    337

    Cannot catch C runtime exception

    try {
    GridNode* neighbour = grid[x+xi][y+yi];
    if (getCost(node, neighbour) >= 0)
    neighbours.push_back(neighbour);
    } catch (...) {
    continue;
    }

    When x+xi == -1, the exception is not...
  23. Replies
    4
    Views
    420

    Re: std::find_if problem

    Yep, should have used find instead.
    Thanks
    Jack
  24. Replies
    4
    Views
    420

    Re: std::find_if problem

    Hello
    std::set container is best suited for value elements, rather than pointer elements?
    Thanks
    Jack
  25. Replies
    4
    Views
    420

    std::find_if problem

    I've got these std::find_if in my code, do you know which one is faulty?



    Error 6 error C2064: term does not evaluate to a function taking 1 arguments c:\program files (x86)\microsoft visual...
Results 1 to 25 of 684
Page 1 of 28 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