What is the best and useful debug tool in Linux environment for Perl and C++ scripts?
In related to that, does anyone know the differences between Eclipse to DDD tools?
Thank you,
YoDar.
...
I want to hold reference to object so it doesn't get deleted in bind function, but without using helper function.
struct Int
{
int *_int;
~Int(){ delete _int; }
};
void holdReference(boost::shared_ptr<Int>, int*) {} // helper
boost::shared_ptr<int> fun()
{
boost::shared_ptr<Int> a ( new Int );
// I get 'a' from some pleas...
We are going to start a long lasting project using C++ as the programming language.
I read that C++0x is going to come out in 2011, so they called it C++11.
When C++11 comes out, we will still be developing the project, and would like to know if it is possible to use any features of the new C++ standard now, to able to:
code faster ...
Based on the following simple program the bitwise left shit operator works only for 32 bits. Is it true?
#include <iostream>
#include <stdlib.h>
using namespace std;
int main(void)
{
long long currentTrafficTypeValueDec;
int input;
cout << "Enter input:" << endl;
cin >> input;
currentTr...
I have been trying to get LastBootUpTime using Win32_OperatingSystem class (WMI).
HRESULT hr = pEnumerator->Next(WBEM_INFINITE, 1,
&pclsObj, &uReturn);
if(0 == uReturn)
{
break;
}
VARIANT vtProp;
// Get the value of the Name property
hr = pclsObj->Get(L"LastBootUpTime", 0, &vtProp, 0, 0); ...
Currently, I am developing an app for a China customer. China customer are mostly switch to GB2312 language in their OS encoding. I need to write a text file, which will be encoded using GB2312.
I use std::ofstream file
I compile my application under MBCS mode, not unicode.
I use the following code, to convert CString to std::string, a...
I would like to get the application icon for all foreground applications running on my Mac. I'm already iterating over all applications using the Process Manager API. I have determined that any process that does not have the modeBackgroundOnly flag set in the processMode (as retrieved from GetProcessInformation()) is a "foreground" appli...
In my class design I ran into the following problem:
class MyData
{
int foo;
};
class AbstraktA
{
public:
virtual void A() = 0;
};
class AbstraktB : public AbstraktA
{
public:
virtual void B() = 0;
};
template<class T>
class ImplA : public AbstraktA
{
public:
void A(){ cout << "ImplA A()"; }
};
class ImplB ...
My native C++ COM component uses ATL. In DllRegisterServer() I call CComModule::RegisterServer():
STDAPI DllRegisterServer()
{
return _Module.RegisterServer(FALSE); // <<< notice FALSE here
}
FALSE is passed to indicate to not register the type library.
ATL is available as sources, so I in fact compile the implementation of CComM...
Hi,
I'm trying to purge a specific ticket from the cache,using LsaCallAuthenticationPackage.
I always get ERROR_INVALID_PARAMETER 87 in the package status.
What could be the reason?
Here is my code (All other steps succeeded):
KERB_QUERY_TKT_CACHE_REQUEST tktCacheRequest = {
KerbQueryTicketCacheMessage};
void* pRep;
DWORD ...
If i have a stl map from string to int and i want to print all the int values sorted - how can i do that?
...
Should application catch "bad" signals such as SIGSEV, SIGBUS?
...
Hi
I would like to know if it is possible in QTWebKit to install an event filter or capture events that occur from specific Dom elements. For example, my webview is showing a webpage that has text, images and an edit box, I want to disable the right-clicking and highlighting functionality on the text and images but at the same time when...
I have a floating point exception, and I don't know why.
the code is this:
void calcola_fitness(){
vector<double> fitness;
int n=nodes.size();
int e=edges.size();
int dim=feasibility.size();
int feas=(feasibility[dim-1])*100;
int narchi=numarchicoll[dim-1]/e;
int numero_nodi=freePathNode.size()/n;
double...
i have redhat with gcc 4.1.1 i have compile as "gcc test.c" and give the following error
Error : expected '=' ,',' , ';' , ásm' or '__ attribute__' before '<' token
the code in "test.c" is as follow
template <typename T> class A {
public:
T foo;
};
...
I have a class which is essentially just holds a bunch of constant definitions used through my application. For some reason though, longs compile but floats do not:
class MY_CONSTS
{
public :
static const long LONG_CONST = 1; // Compiles
static const float FLOAT_CONST = 0.001f; // C2864
};
Gives the following error:
1...
how to create API development for openGL texture from live cameras
...
I find smart pointers to be a lot more comfortable than raw pointers. So is it a good idea to always use smart pointers? ( Please note that I am from Java background and hence don't much like the idea of explicit memory management. So unless there are some serious performance issues with smart pointers, I'd like to stick with them. )
An...
I have a program that reads data from a file line-by-line. I would like to copy some substring of that line in to a map as below:
std::map< DWORD, std::string > my_map;
DWORD index; // populated with some data
char buffer[ 1024 ]; // populated with some data
char* element_begin; // points to some location in buffer
char* element...
hi,
I am working on Windows xp and am trying to get a simple video player running.
I am trying to use Phonon::VideoPlayer module for this. I am connecting the signal as
connect(self.player,SIGNAL("finished()"),self.player.deleteLater)
and then , when the Play button is pressed, it makes the following call:
self.player.play(Phono...