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...
Type: Posts; User: HIM
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...
Could anyone tell me why the following code fragment is not valid. I get an Undefined Structure error
class MyClass
{
public:
........
private:
MyClass...
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...
bool AStarNode::operator<(AStarNode &m)
{
if(f != m.getF())
return f < m.getF();
else
return h < m.getH();
}
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...
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...
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...
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...
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...
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
...
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;
...
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...
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...