Search:

Type: Posts; User: HIM

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,331

    UPDATE: I feel its incredibly messy, but Im...

    UPDATE:

    I feel its incredibly messy, but Im currently using a vector<MyClass> to store my instance. While it looks and most likely is wasteful, not only does it work, but it also allows me to...
  2. Replies
    4
    Views
    1,331

    Classes storing instances of own class.

    Could anyone tell me why the following code fragment is not valid. I get an Undefined Structure error



    class MyClass
    {
    public:
    ........
    private:
    MyClass...
  3. Thread: Priority_queue

    by HIM
    Replies
    8
    Views
    1,221

    By god it works.. it WORKS.... I've come to...

    By god it works.. it WORKS....

    I've come to the conclusion that the problem was a mixture of two things. The first being my lack of knowledge of c++, and the way in which operator overriding must...
  4. Thread: Priority_queue

    by HIM
    Replies
    8
    Views
    1,221

    bool AStarNode::operator

    bool AStarNode::operator<(AStarNode &m)
    {
    if(f != m.getF())
    return f < m.getF();
    else
    return h < m.getH();
    }
  5. Thread: Priority_queue

    by HIM
    Replies
    8
    Views
    1,221

    Ok. After thinking this through. I assume its...

    Ok. After thinking this through. I assume its working with pointers because the queue is no longer using my operator overloading to compare the values, yes?

    Which still leaves me having no clue as...
  6. Thread: Priority_queue

    by HIM
    Replies
    8
    Views
    1,221

    Still having some trouble with the queue. I've...

    Still having some trouble with the queue. I've implemented operator overloading in the class, and it works fine, so I know thats not the problem. For some reason though, Im getting an error when I...
  7. Thread: Priority_queue

    by HIM
    Replies
    8
    Views
    1,221

    Priority_queue

    How do I go about adding a comparator to a priority queue. I have a class which Im using as my Type for the queue, and want to order the class elements according to my own comparator. Is there a...
  8. Replies
    3
    Views
    1,137

    Thanks for the advice guys. I decided to use a...

    Thanks for the advice guys. I decided to use a pointer to the address of the first element of the array, then make my own method to translate the standard myArray[i][j] reference, into a single...
  9. Replies
    4
    Views
    985

    Thanks for the quick reply. When you say you'd...

    Thanks for the quick reply.

    When you say you'd prefer to give them different names, is that just personal preference, or is there justification for doing this? Just so I know which would be the...
  10. Replies
    4
    Views
    985

    quick question concerning "this"

    Hi, further in my quest to make the transtition from java to c++. Code anybody tell me the equivalent c++ syntax to assign a method parameter to a class variable... ie, in java you would use



    ...
  11. Replies
    3
    Views
    1,137

    Multi-Dimension Array Declaration...

    Hi, Im currently teaching myself c++ and translating some of my java programs, to ease the transition. Could anyone tell me how to translate the following piece of code




    int[][] myArray;
    ...
  12. Thread: Which Compiler?

    by HIM
    Replies
    5
    Views
    1,196

    So can I use a c++ IDE for c programs. I realise...

    So can I use a c++ IDE for c programs. I realise they are a similar language, but I assumed the OOP aspects of c++ meant it would have dedicated IDE's..

    Cheers for the help though guys...
  13. Thread: Which Compiler?

    by HIM
    Replies
    5
    Views
    1,196

    Which Compiler?

    Hi.

    Was just wondering if anyone could recommend me a developing environment for c. Im currently using miracleC, but Im after something more along the lines of IntelliJ IDEA for java. Free would...
Results 1 to 13 of 13