Search:

Type: Posts; User: a.mlw.walker

Page 1 of 9 1 2 3 4

Search: Search took 0.01 seconds.

  1. Hey, Interesting.... So should my Graph class...

    Hey,

    Interesting....
    So should my Graph class just hold the list of BaseNodes and no algorithms...
    Then my DerivedGraph holds lists of different types of Nodes, inherited from BaseNodes

    Then...
  2. OK yeah that example didnt do what I expected it...

    OK yeah that example didnt do what I expected it to do, so sorry about that....

    Going back to your previous point:


    what is the cost of casting? Apart from it being annoying to have to write...
  3. Hi guys, I have spent some time looking into...

    Hi guys,
    I have spent some time looking into templating classes, it was proving a little tricky and on my digital travels looking for help, I discovered this solution, which seemed to work. Could...
  4. So is it still considered a hybrid when all...

    So is it still considered a hybrid when all "hybrids" are children of the same thing?
    Basically I want to be able to write base functions that can be applied to a node and allow others to be able to...
  5. So is it still considered a hybrid when all...

    So is it still considered a hybrid when all "hybrids" are children of the same thing?
    Basically I want to be able to write base functions that can be applied to a node and allow others to be able to...
  6. Oh and when I do things like getNeighbours(), if...

    Oh and when I do things like getNeighbours(), if I return a vector on the stack of pointers then I obviously dont have to destroy the vector, however IF, and I know its wrong (now), but IF I was...
  7. Thanks, so at the moment I cant think of a...

    Thanks,
    so at the moment I cant think of a situation, but its more about future design, as I wanted to design the Base classes so they sere inherited from.
    If the baseGraph is the only thing that...
  8. Ok so the first thing that I am rethinking is...

    Ok so the first thing that I am rethinking is getting neighbours should indeed be a function of the node and not the graph. That makes sense.
    Then getNeighbours() can be in BaseNode.
    So should...
  9. Thanks guys, I am starting to get this. ...

    Thanks guys, I am starting to get this.

    Firstly I do not want a user of the basegraph to be limited to a specific type of node. Secondly I do not want the basegraph to know of the types inherited....
  10. Ok thanks guys. So the "more information" I am...

    Ok thanks guys. So the "more information"
    I am writing a simple graph database. The way I want it designed is there are BaseGraph, BaseNode and BaseEdge classes. These each hold the methods that are...
  11. Hi Yeah, thanks I did post the same question, and...

    Hi Yeah, thanks I did post the same question, and grumpy responded with:



    Its that first line that I think is the important bit, however, so is the only way to do this, as laserlight says, to...
  12. Passing reference to derived class, where base class is expected

    Hi, I have seen this question appearing around the web, and I have now run into it. I have found a fix for it, but it doesnt seem tidy enough to be the correct way of handling it

    Lets say we have...
  13. Reference from a class to take a sub class

    Sorry, my title may not be very descriptive. Perhaps I can do better here ;)

    I have a class called Node. I am subclassing it to make a class called CustomNode.
    Another class takes a reference to...
  14. Replies
    1
    Views
    832

    C++ Web server malloc memory error

    Hi Everyone,
    So I am writing a very basic database in C++ and I am accessing the data from a web browser. I am using the opensource Mongoose web server code....

    I have an issue...
    The way the DB...
  15. Replies
    1
    Views
    1,903

    passing char array index as pointer

    Hi I am trying to write a light weight printf style function.

    I have got this far:



    void println(const char *txData){
    LOG(__PRETTY_FUNCTION__);
    UARTPuts (LPC_UART0, txData);
    }
  16. Replies
    5
    Views
    6,006

    Saving clipboard image to jpg

    Hi Everyone.
    I have an image in my clipboard - from alt-printscreen and I want to save it to a jpg - or better I want to atleast be able to access the data as jpg formatted data so i can then do...
  17. So I see what you mean now Andruil463, in theory:...

    So I see what you mean now Andruil463, in theory:



    int PrintMACaddress (unsigned char *addr)
    {
    int i = 0;
    char temp[25];
    char *cs = temp;
    int used = 0;
  18. So this gives me: int PrintMACaddress...

    So this gives me:


    int PrintMACaddress (unsigned char *addr)
    {
    int i = 0;
    char temp[25];
    char *cs = temp;
    int used = 0;
    do {
  19. Hi Sorry for my confusion, I have changed the...

    Hi Sorry for my confusion, I have changed the code to:



    int i = 0;
    char temp[25];
    char *cs = temp;
    int used = 0;
    do {
    sprintf(cs, "%x", *addr++);
  20. converting unsigned char to char* for concatenation

    Hi I have a function that finds my mac address, I am trying to store it in a char * variable.
    This is my function to display it:


    void PrintMACaddress (unsigned char *addr)
    {
    int i;
    ...
  21. Replies
    7
    Views
    1,367

    The reason I'm not using vectors is because this...

    The reason I'm not using vectors is because this is on an 8 bit embedded platform. Its basically C, however using C++ I can use classes which I prefer. If I wanted to use vectors I would need the...
  22. Replies
    7
    Views
    1,367

    Yeah, it doesnt need to be a member, its just It...

    Yeah, it doesnt need to be a member, its just It goes out of scope when a function finishes so I cant access it later, thats why I made it a member. I would rather do this without new/delete but I...
  23. Replies
    7
    Views
    1,367

    Copy array into pointer

    I have written this code, and at first glance it does what I want, however I am worried that a) I am overwriting the array that is apssed from chord.getPattern() b) Im getting a memory leak that I...
  24. Replies
    3
    Views
    1,730

    pass array directly to new object

    Hi, I have an object that takes an array as a parameter of the constructor:


    class Foo {
    public:
    Foo(int array[]);

    private:
    int _array[];
    }
  25. Replies
    11
    Views
    1,094

    this is the ticket: :...

    this is the ticket:


    : VisualInterface(DisplayDriver) {}



    Thank you very much guys, I've been looking for that for a while. i didnt realise you could do that.

    Its an interface to attach...
Results 1 to 25 of 205
Page 1 of 9 1 2 3 4