No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
9 Posted Topics
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.
Actually you need to [CODE]float number2 = (float)number / 1000;[/CODE] for real answer, because, 3001/1000 will give you 3, and it will cast it to float as 3.0
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.
The End.
metdos