Search:

Type: Posts; User: yahn

Page 1 of 6 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    6
    Views
    1,069

    Bah, I did it again. That's what I have, but I...

    Bah, I did it again. That's what I have, but I didn't write the example correct.



    template<class T>
    struct Quadtree<T>::NodeItem {
    NodeItem(const T *item, const Coord &mCoord);
    const T...
  2. Replies
    6
    Views
    1,069

    No, when I set C's mK to h.mK, I want C's mK to...

    No, when I set C's mK to h.mK, I want C's mK to stay the same value as it was assigned. So, if h.mK changes at a later point, I don't want C's mK to change to that value. I want it to stay the...
  3. Replies
    6
    Views
    1,069

    What is wrong with this reference?

    let's say I have this struct:


    struct H {
    K mK;
    // ...
    };

    and this class:
  4. Replies
    7
    Views
    2,055

    Sorry, I had properly declared the class, I just...

    Sorry, I had properly declared the class, I just didn't write it done correctly when making the example. But, you're suggested works. Thank you

    Now, I'm not getting any errors about the class,...
  5. Replies
    7
    Views
    2,055

    Oh, that makes sense. How about when you want to...

    Oh, that makes sense. How about when you want to return the nested type?

    I have:


    template<class T>
    class H {
    private:
    class K;
    // ...
  6. Replies
    7
    Views
    2,055

    I didn't want it to. The types always have to be...

    I didn't want it to. The types always have to be the same. I guess this is achieved by having two separate variables anyways, though. Yes?
  7. Replies
    7
    Views
    2,055

    Template class nested in template class

    I'm trying to create a container class that has node-like objects. These need to be templates. I tried:



    template <class T>
    class H {
    private:
    template <class T> class K;
    //...
    };
  8. Replies
    2
    Views
    5,129

    I know this is a lot to ask, but can anyone...

    I know this is a lot to ask, but can anyone verify that this is, in fact, a working quadtree? It took me a long time to get it to "work." I don't know how to make sure that I did everything right,...
  9. Replies
    2
    Views
    5,129

    Quadtree Node -> pointers to the children node

    This is what I have, but I don't think it's right:

    In the hpp file I have:
    mChildren **Node;

    and in the c++ file

    when I want to create the children:
    *mChildren = new Node[4];
  10. Replies
    3
    Views
    1,797

    data type long enough to store 2^64

    I can't seem to find a data type that can store integers up to length 2^64. Can anyone point me in the right direction?

    Edit:

    Unsigned long long int works, but it seems to not be working with...
  11. Ah, thank you. I read the example wrong, and it...

    Ah, thank you. I read the example wrong, and it looked like replace(p, n, str) only replaced a maximum on n bytes.
  12. replacing a substring of a string with another string

    How can I use string.replace() to do something like:



    string str, str2, str3;
    str = "an adequate amount of text";
    str2 = "amount of ";
    st3 = "";

    str.replace(str2, str3); // an adequate...
  13. Replies
    19
    Views
    5,694

    Well, it is working now, but I don't know why. I...

    Well, it is working now, but I don't know why. I originally moved the files from where code::blocks had compiled them to the directory of the DLL I am currently working on. When I linked to the...
  14. Replies
    19
    Views
    5,694

    I'm still getting the same error. I get this any...

    I'm still getting the same error. I get this any time I try to link to a dll I compiled with code::blocks to another project I'm compiling in code::blocks. Do I need to link to anything else other...
  15. Replies
    19
    Views
    5,694

    Hm, I figured I probably did something wrong. ...

    Hm, I figured I probably did something wrong. However, it still cannot find -lYsound. I think I need a lib file.
  16. Replies
    19
    Views
    5,694

    It is linking to the file that I want and...

    It is linking to the file that I want and including the header that I want. I'm using GCC.

    Am I doing something wrong in the DLL?



    // dll cpp file
    #define DLLEXPORT extern "C"...
  17. Replies
    19
    Views
    5,694

    It says the same thing. "ld.exe cannot find...

    It says the same thing. "ld.exe cannot find -lYsound." Do I have to have a lib file? All the other DLLs need to link to .libs, but Code::blocks doesn't give .lib files with the DLLs it compiles.
  18. Replies
    19
    Views
    5,694

    libYsound.a

    libYsound.a
  19. Replies
    19
    Views
    5,694

    I get: "ld.exe cannot find -l"nameoflib.

    I get: "ld.exe cannot find -l"nameoflib.
  20. Replies
    19
    Views
    5,694

    linking to my own DLL

    Oddly, I've always linked to other peoples DLLs and never my own. Now, I want to link to my own DLL, and I don't know why I can't.

    I created the DLL with code::blocks and I'm linking to the .a...
  21. Replies
    10
    Views
    8,948

    Ok, I understand. Thank you.

    Ok, I understand. Thank you.
  22. Replies
    10
    Views
    8,948

    Ok, that makes sense. I tried using Quadtree...

    Ok, that makes sense. I tried using Quadtree *children[4]; but I get a lot of errors.

    Why can I not do something like this:


    Quadtree::Quadtree()
    {
    children = new Quadtree[4];
    for...
  23. Replies
    10
    Views
    8,948

    Class with a pointer to itself

    I need to make a quadtree.

    I have:


    class Quadtree
    {
    public:
    ...
    private:
  24. Replies
    13
    Views
    2,627

    The problem appears to be that I have to put /i...

    The problem appears to be that I have to put /i in front of the input file even though it actually clearly states that it works without /i. That isn't a very good explanation for me, but it is...
  25. Replies
    13
    Views
    2,627

    I don't get it either. I'm calling it in, what...

    I don't get it either. I'm calling it in, what appears to me, exactly the same way. Is there any thing else I can do? I can't really find any documentation on this function to help me.
Results 1 to 25 of 137
Page 1 of 6 1 2 3 4