Hello, i need to write a template with Nodes containing data with 2 data structures : a map and a minimum heap, both got the same nodes in it and every 2 same nodes are connected.
the problem is that i need the heap to know the node fields for the heapify for example, and i don't know what's the right way to do so, friends? public fields...
hello i am building a template in c++ ,and i need to overwrite the operator "<" inside the template for being able to compare between items inside my data structure.
could anyone please tell me how to overwrite it ... should i send a pointer to a function inside the constructor of the template?
I got two templates, the first one is Node ...
Is it possible on Windows without using WinAPI?
...
I'm coding a small and basic error tracker with Qt. The whole application is in a QTable.
Each error is linked to a file ; so, one of the columns of my table deals with that. I have a QLabel and a button next to it ; you click on the button to select a file, and then, the label displays the name of the file.
What I'd like to do now : t...
Hello
i want to develop some game and i am at a beginner level.
so when i searched it on Google a long list of various game engines (like Delta 3D,Panda 3D)
comes and when i looked at wikipedia it also showed a very large list so i am
confused that from where i start.
So suggest me a good game engine and some good tutorial or a ...
I've tried to run the following code on my PC.
With PORT 0x378 (LPT1 data) it works fine.
But with PORT 0x379 (LPT1 status) it always returns 126 no matter what I output in the previous line. 0x37A works too. I have Windows XP
#define PORT 0x379
#define DATA 255
int main(int argc, char *argv[])
{
Input input;
Output output;
...
those are the maps:
multimap<SortKey,T> firstMap;
multimap<SearchKey,pair<SortKey,T>*> secondMap;
template <class T,class SortKey, class SearchKey> bool GarageDataBase<T,SortKey,SearchKey>::Add(T data,SortKey key1, SearchKey key2)
{
multimap<SortKey,T>::iterator it;
it=(firstMap.insert(pair<SortKey,T>(key1,data)));
pair<SortKey,T>...
I have to design and implement a program to accomplish drum stick matching (not the eating one). There are two parameters I have to check i.e Weight and Pitch (acoustical property) for the two different drumstick and find pair of matching drumstick. I created three classes i.e Bin, Sorter and Stick and in project description Robot class ...
I am searching for a (multi)map where there values are associated by different key types. Basically what was asked here for Java but for C++. Is there something like this already or do I have to implement it myself?
Another, more simple case (the above case would solve this already but there may be a more simple solution esp for this ...
Possible Duplicate:
Template type deduction in C++ for Class vs Function?
When calling a template function, you don't need to specify the template parameters if they are non-ambiguous from your parameters. E.g. for:
template<typename T> T foo(T a) { /*...*/ }
You can just call foo(1) and it will work, it does not need to be...
I want to get information about functions in global hook chain in windows. in fact i need to get the list of them and get their corresponding application if it's possible.
As far as I know there is no windows API for doing this so I think i have to find them by going through the hook chain link list. but i don`t know the data structure ...
i m looking for a bayesian network library that work on the iphone.
any tip ?
...
Hi,
I have an very strange error : When i want to use the SocialServer::Client class from my SocialServer::Server class the linker threw me 2 LNK2019 errors :
Error 1 error LNK2019: unresolved external symbol "public: void __thiscall SocialServer::Client::Handle(void)" (?Handle@Client@SocialServer@@QAEXXZ) referenced in function "priva...
I think my problem is best described in code:
#include <stdio.h>
struct Foo;
extern Foo globalFoo;
struct Foo {
Foo() {
printf("Foo::Foo()\n");
}
void add() {
printf("Foo::add()\n");
}
static int addToGlobal() {
printf("Foo::addToGlobal() START\n");
globalFoo.add();
prin...
class student
{
char *name;
int I;
public:
student()
{
I=0;
name=new char[I+1];
}
student(char *s)
{
I=strlen(s);
name=new char[I+1];
strcpy(name,s);
}
void display()
{
cout<<name<<endl;
}
void manipulate(student &a,student &b)
{
I=a.I+b.I;
delete name;
name=new char[I+1];
strcpy(name,a.name);
strcpy(n...
Is it possible to make one program, written in Java, C++ and D?
...
I have a conversion like this:
Class1 *p1;
Class2 *p2 = new Class2();
p1 = (Class1 *) p2;
Can I override the typecast operator above to return a custom Class1 object pointer?
If yes how?
EDIT: My exact problem is that I have code like this:
if (*$1 == ArrayType(AnyType()))
{
$$ = ((ArrayType *) $1)->getElementsType();
}
Operat...
is there any easy tutorial to show how to make operating system says hello world using c++
...
Can anyone suggest a guide for learning the OpenGL 3.2 core profile?
The SDK is hard to read, and most of the guides I have seen only taught the old method.
...
template<typename T1, typename T2>
class Bimap {
public:
class Data;
typedef Data* DataP;
typedef std::multimap<T1, DataP> T1Map;
typedef std::multimap<T2, DataP> T2Map;
class Data {
private:
Bimap& bimap;
T1Map::iterator it1;
/*...*/
};
};
This gives me this compile error:
erro...