No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
Hello Everyone, I'm trying to implement a Polymorphic Queue. Here is my trial: [CODE]QQueue <Request *> requests; while(...) { QString line = QString::fromUtf8(client->readLine()).trimmed(); if(...)){ Request *request=new Request(); request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); //this initialize variables in request using tcpMessage if(request->requestType==REQUEST_LOGIN){ LoginRequest loginRequest; request=&loginRequest; request->tcpMessage=line.toUtf8(); request->decodeFromTcpMessage(); requests.enqueue(request); } //Here pointers in "requests" do not … | |
For example, [CODE]MyClass *stable; if(..){ MyClass temp; stable=&temp; } stable.myVariable;[/CODE] Code snippet above does not work, because destructor of temp object is called. How Can I Increase Scope of "temp" object? Thanks. | |
Re:
Hey guys, i been looking through at questions regarding roman numerals and i have a question. i ran some of the coding which i found and i dont quite understand this part.. [CODE] int number = 3000; int number2 , i ; number2 = number / 1000; for(i = 1; … | |
For example. [CODE]float test[2]; map < string, "what should I put here?" > myMap;[/CODE] I want a map where keys are string, and values are array of float in size 2. I can use vector <float>, but I don't want to use vectors. | |
Is there any naming convention for C++ which is widely used and accepted? | |
We need a good open source issue tracking program which is compatible with SVN and windows platform. We are developing programs with VS 2005. Do you have any suggestions? Thanks. | |
This is the situation, I wonder the reason. in .c file this works properly[CODE]vciDeviceOpen(&sInfo.VciObjectId, &hDevice);[/CODE] and this gives error :error C2440: 'function' : cannot convert from 'VCIID' to 'REFVCIID' [CODE]vciDeviceOpen(sInfo.VciObjectId, &hDevice);[/CODE] but in .cpp file this works properly[CODE]vciDeviceOpen(sInfo.VciObjectId, &hDevice);[/CODE] and this gives error :error C2664: 'vciDeviceOpen' : cannot convert parameter … | |
I have this global variable. [ICODE]void * userInterface;[/ICODE] and this line in main.cpp [ICODE]_beginthread( ReceiveThread, 0, NULL);[/ICODE] and ReceiveThread [ICODE]void ReceiveThread( void* Param ) { ........... QString str; rovkonInterface *w=((rovkonInterface *)userInterface); w->ui.systemStatusText->insertPlainText("abc"); ........ [/ICODE] and I get runtime error: ASSERT:"qApp && qApp->thread()==currentQThread" in file .... and I tested same code … | |
I want to add my header file as #include <vcinpl.h> instead of #include "vcinpl.h" how can I manage this? Thanks. |