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...
Type: Posts; User: yahn
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...
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...
let's say I have this struct:
struct H {
K mK;
// ...
};
and this class:
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,...
Oh, that makes sense. How about when you want to return the nested type?
I have:
template<class T>
class H {
private:
class K;
// ...
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?
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;
//...
};
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,...
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];
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...
Ah, thank you. I read the example wrong, and it looked like replace(p, n, str) only replaced a maximum on n bytes.
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...
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...
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...
Hm, I figured I probably did something wrong. However, it still cannot find -lYsound. I think I need a lib file.
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"...
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.
libYsound.a
I get: "ld.exe cannot find -l"nameoflib.
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...
Ok, I understand. Thank you.
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...
I need to make a quadtree.
I have:
class Quadtree
{
public:
...
private:
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...
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.