In our server/client-setup we're experiencing some weird behaviour. The client is a C/C++-application which uses OCI to connect to an Oracle server (using the OTL library).
Every now and then the DB server dies in a way (yes this is the core issue, but from application-side we're unable to solve it but have to deal with it anyway), that...
Hi,
I've got some code that lies in a browser, and wrote C++ plugins for both IE (COM/ActiveX) and firefox (NPAPI).
I now have to get this code work on Mac OS X. I found some input on apple's site, but it's written in Objective C.
I also read about SIMBL, but it seems to deal with Objective C code only, isn't it?
So here are my quest...
I'm new to C++, so this may be a noobish question; I have the following function:
#define SAFECOPYLEN(dest, src, maxlen) \
{ \
strncpy_s(dest, maxlen, src, _TRUNCATE); \
dest[maxlen-1] = '\0'; ...
When generating a COM dll with VisualStudio, all I really need is the DllCanUnloadNow symbol (and three related ones) to be exported from the dll itself. Nobody is going to link against my library, so I'm not (at all) interested in a .lib file, nor in an .exp file.
However, I don't manage to inhibit creation of these files. (note: I...
HI I have a application developed in VC++6.0 ,now I want use some new features from .NET and developed a library, to develop this library I have to use the CLR-VC++ now I packaged this in a DLL.Now I need to call the routine of this DLL in my MFC application.
I tried to write a small MFC application to load this DLL, All the time the Lo...
§23.1.2.8 in the standard states that insertion/deletion operations on a set/map will not invalidate any iterators to those objects (except iterators pointing to a deleted element).
Now, consider the following situation: you want to implement a graph with uniquely numbered nodes, where every node has a fixed number (let's say 4) of neig...
I am trying to determine a window control's visibility that has been hidden or enabled with CWnd::ShowWindow(). (or ::ShowWindow(hWnd,nCmdShow))
I cannot simply use ::IsWindowVisible(hWnd) as the control is on a tab sheet, which may itself be switched out, causing IsWindowVisible to return FALSE.
Is there a way to get the SW_SHOW/HIDE ...
How can two developers work on a same C++ code base such that they can work transparently ?
Is there any common indentation style for C++ code such that once it is established, the two developers can produce code with the same indentation level.
I have found Emacs very aggressive for Indentation, it tries to force its way, while Vi is...
I am trying to build a Windows service with MingW. It need thread safe exceptions, so I added the linker flag -mthreads. The application works fine from the command-line, but when I try to start it from services.msc, the 1054 error ("The service did not respond to the start or control request in a timely fashion") is raised. The service ...
My colleague claims that we should dissect our C++ application (C++, Linux) into shared libraries to improve code modularity, testability and reuse.
From my point of view it's a burden since the code we write does not need to be shared between applications on the same machine neither to be dynamically loaded or unloaded and we can simpl...
I am importing legacy C++ code using Rhapsody. One class has many (several dozen) attributes I'd rather see imported as separate classes. I've tried different "options" settings with no results. Is there a way to do this, other than redo all by hand?
...
Hi, everyone!
I have a class, say, "CDownloader", that reads some XML data and provides access by node names. It features some getter functions, something like this:
BOOL CDownloader::getInteger ( const CString &name, int *Value );
BOOL CDownloader::getImage ( const CString &name, BOOL NeedCache, CImage *Image );
BOOL CDownloader::ge...
Hi,
Here is a very simple C++ application I made with QtCreator :
int main(int argc, char *argv[])
{
int a = 1;
int b = 2;
if (a < 1 or b > 3)
{
return 1;
}
return 0;
}
To me, this is not valid C++, as the keyword or is not a reserved keyword.
But if I compile and run it, it works find without any war...
Hey,
I like to know how one can integrate the Qt libraries into an Enterprise Architect project. I do not know if it is possible at all but I tried it with partial success:
I added a new package to my project tried to import qt through Context Menu / Code Engineering / Import Source Directory and started with the directory src/corelib/k...
If I create a new form called myForm, the top of myForm.h looks like this:
#pragma once
using namespace System;
using namespace System::ComponentModel;
using namespace System::Collections; //<<<< THIS ONE
using namespace System::Windows::Forms;
using namespace System::Data;
using namespace System::Drawing;
None of these are even ...
I was recently asked about alternatives to Coverity Prevent for a code base that includes both C/C++ and Java. Obviously, on the Java side, the free tools available include Findbugs (compiled code analysis) and PMD (static code analysis). They are very powerful, especially when you start investigating integration with IDEs (which, agai...
Using VS2003 (.Net 1.1) We have an MFC MDI application that spawns a C# window as a COM client.
We need to catch all user input within the application and we're currently using CWinApp::PreTranslateMessage() to catch the commands headed to the MFC windows but this obviously doesn't catch the messages headed to the C# window.
What is th...
Hello guys,
Why next function returns 0 ?
(My environment is: Windows Vista, vc++9, Qt4.5)
int func()
{
QPushButton button("Blah blah");
QFontMetrics fm = button.fontMetrics();
return fm.leading();
}
Calling to "fm.height()" returns reasonable results (16 px in my case).
Calling to "fm.lineSpacing()" returns same resu...
For testing purposes, I need to find two 64-bit integer values that exactly multiply to a 128-bit intermediate value with a specific bit pattern. Obviously, I can generate the desired intermediate value and divide by random values until I find a combination that works, but is there a more efficient way?
...
I was studying in the famous schaums outline c++ programming book, and i saw something called list initialization - i didn't know that before.
I made a code according to the book, but it raised a lot of compiler errors. I was asking my self where the problem is, so i copied the code from the book, and guess what - it didn't work!
Here...