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 30 1 2 3 4

Search: Search took 0.03 seconds.

  1. Re: overriding == operator in order to test equality of two pointers

    Compilation Error in my program for sure!
    But I just put the operator in my .cpp file, it will automatically compare for me...
    No need to specify to use this operator?
    Thanks
  2. Re: overriding == operator in order to test equality of two pointers

    Hi,
    Now I've added a global operator of <, what's next how to make use of it?



    bool operator < (const AStarNodePair& one, const AStarNodePair& two) {
    return std::tie(one.from, one.to) <...
  3. Re: overriding == operator in order to test equality of two pointers

    std::map<AStarNodePair, float, AStarNodePairComparator> actualCosts;

    bool AStarNodePairComparator::operator()(const AStarNodePair& one, const AStarNodePair& two) const {
    return...
  4. Re: overriding == operator in order to test equality of two pointers

    Hi laserlight,
    I put a breakpoint within this method, but the prog never pauses at that breakpoint.
    Any ideas why?

    The from Node and to Node are both const within the class now.


    ...
  5. overriding == operator in order to test equality of two pointers

    The new np will have a different address, if I get the actualCosts which is a std::map,
    I can't seem to find the correct pair from the container.
    I try to override the == operator to make sure they...
  6. Replies
    2
    Views
    244

    Re: Why is this GUID decorated?

    Thanks man!
  7. Replies
    2
    Views
    244

    Why is this GUID decorated?

    DEFINE_GUID(TID_ActualCost_Data,
    0xA51D06AC, 0x86B7, 0x4998, 0xB0, 0xAA, 0xE1, 0x5F, 0x3E, 0x15, 0x22, 0xB7);




    Error 6 error LNK2001: unresolved external symbol...
  8. seemingly dead lock with thread pool library

    http://www.codeproject.com/Articles/637708/Thread-Pool

    I am right now using this library.
    I simply create 2 parallel threads to deal with pathfinding problem.
    In my findPath function which is...
  9. Replies
    7
    Views
    505

    Re: Would this cause a link time error?

    I try to avoid passing the same single-copy object around.
    Why is it not good?
    Thanks
    Jack
  10. Replies
    7
    Views
    505

    Re: Would this cause a link time error?

    Okay,
    I can use
    static int getValue();

    Update:
    Whoops, wrong... Not good to declare methods as static, what is the alternative?
  11. Replies
    7
    Views
    505

    Would this cause a link time error?

    #include "stdafx.h"
    #include "A.h"


    int _tmain(int argc, _TCHAR* argv[])
    {

    int v = A::b.getValue();
    return 0;
    }
  12. Sort by a value, where lowest score comes first.

    The lowest f score should be the first one.
    Is this correct?
    Thanks for verifications.
    Jack



    bool TimeAStarComparator::operator()(TimeAStarNode* one, TimeAStarNode* two)
    {
    if...
  13. Re: Accepting a value by reference upon return

    Sorry, Fixed that. I got an indirect method to call, so messing things up...
  14. Re: Accepting a value by reference upon return

    Hello laserlight,
    Thanks for helping.
    I don't know why when the element A is returned, it still got destroyed immediately.
    The pointers inside there are 0xfeeefeee and some garbage values for...
  15. Re: Accepting a value by reference upon return

    I need to keep the nodes sorted.
    Are there any Sorted Arrays in C++, I wonder?
    Thanks
    Jack
  16. Accepting a value by reference upon return

    A& a = b.GetValue();


    A& B::GetValue(std::set<A, scomparator>& nodes, int i) {
    std::set<A, scomparator>::iterator it = nodes.begin();
    std::advance(it, i);
    A& n = (A&)*it;
    ...
  17. Re: How to synchronize a worker thread from the main thread?

    To VladimirF: The main thread will just keep on working on things like physics, IK and stuff.
    To Arjay: Yes, the main thread will still be displaying things plus physics and IK and the rest of other...
  18. How to synchronize a worker thread from the main thread?

    I would just hand off some tasks like calculations to the worker thread(s), the main thread will continue on
    with its own work. The main thread will take as much outcome as it can from the worker...
  19. Re: Objective-C cannot find sqlite3.h in Gnustep

    thanks it works now.
    Where can I find some type names called CGPoint and CGSize etc.
    Where can I find them?
    Can you give me a clue?
    Thanks
    Jack
  20. Re: Objective-C cannot find sqlite3.h in Gnustep

    Will I compile it using mingw gcc, and use that .h file found here
    https://www.sqlite.org/download.html
    It will produce .lib and .dll, will objective-c understand?
    Thanks
    Jack
  21. Objective-C cannot find sqlite3.h in Gnustep

    Using Windows 7 x64 + Eclipse CDT + Mingw gcc + Gnustep
    Problem: Cannot find sqlite3.h anywhere in the gnustep directory.
    Using
    - gnustep-core-0.34.0-setup.exe
    - gnustep-devel-1.4.0-setup.exe
    -...
  22. Replies
    63
    Views
    3,464

    Re: Abstraction concept problem?

    But I just can't simply store a reference handle in the class like this



    class A {
    public:
    A(const B& _b) : b(_b) { }

    private:
    B& b;
  23. Replies
    63
    Views
    3,464

    Re: Abstraction concept problem?

    In regard to the pointer stuff,
    I wonder when I pass the reference as an argument to the constructor of another class and retain a copy.
    It would take up a huge number of space in memory if B was...
  24. Replies
    2
    Views
    325

    Re: About C++ HashSet and unordered_set

    Hello, I think I should have added a hashing function,
    But how do I define a good hashing function for my need?
    How do I design one to make the access time good?
    Thanks
    Jack



    struct...
  25. Replies
    2
    Views
    325

    About C++ HashSet and unordered_set

    I am creating a container of std::set, but I need to search it in logarithmic time or constant time.
    Sets don't provide such capabilities, so I look into hash sets,
    I discover the C++ standard...
Results 1 to 25 of 743
Page 1 of 30 1 2 3 4


Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a Codeguru.com survey!


HTML5 Development Center