BLUF: In this function, \' prompt the error message but not \?, Why?
char key[] = "\a\b\f\n\r\t\v\\\'\"#%&*;:<>\?/{|}~";
if (strpbrk(*local_str, key) != NULL )
{
vico_param_out->out_valid = false;
AfxMessageBox("L'identifiant de numérisation est invalide. Vous avez saisi des caractères qui ne peuv...
So I have an ASP DOT NET web service which needs to impersonate Windows Authenticated users. This web service calls into a Com Api to perform database operations.
It seems like the Impersonation does not persist into the Com Api. Is this because the Com DLL is loaded into its own memory space and treated as a separate process? Also what...
I have a GtkLabel and a GtkDrawingArea within a VBox, I want to center the label relative to a X-coordinate of the GtkDrawingArea (which is below of the label in the VBox), how can I tell GTK to center that label relative to that "anchor" point ? This point should be the center of the label.
...
It's common practice where I work to avoid directly using built-in types and instead include a standardtypes.h that has items like:
// \Common\standardtypes.h
typedef double Float64_T;
typedef int SInt32_T;
Almost all components and source files become dependent on this header, but some people argue that it'...
Note: I am using the open source Poco C++ libraries
I have a parent thread that creates many child threads to deal with incoming connections, each of these child threads maintains an XML document, which the parent thread can request at anytime via callback. Therefore I have a mutex protecting this document.
My problem arises in tha...
Hi,
I think the title is clear on explaining my problem.... consider the following snippet:
class Critter {
int m_Age;
};
int main()
{
vector<Critter* const> critters;
for(int i = 0; i < 10; ++i)
critters.push_back(new Critter());
critters[2] = new Critter();
return 0;
}
Shouldn't the line critters[2] =...
Options A:
if (NULL == pSomethingColumn) // Yes, we use Yoda conditions
if (NULL != pSomethingColumn)
Or
if (pSomethingColumn)
if (!pSomethingColumn)
I am looking for references explaining the reasoning as well.
I have heard some people say that technically NULL does not have to be defined as 0, but come on! if that was the case, ...
Hi,
I have a VectorN class, and a Vector3 class inherited from VectorN (which can handle cross products for example). I have trouble determining the return types of the different operators. Example:
class VectorN
{
public:
VectorN(){};
virtual VectorN operator*(const double& d) {.....};
std::vector<double> coords;
};
class Vec...
I am relatively new to C++, coming from the happy-go-lucky world of Python.
I decided to write a set of functions to find the mean, median, mode, and range of a set of numbers. To aid in the calculation of the median, I decided to make l2g (least to greatest) and g2l (greatest to least). I understand I will only be using one of these, b...
I don't have much of an interest in designing guis (too much work), and I wanna know how it is that programs like vim, and greed work, how is it that vim can modify it's standard out without printing it all out again?, and I often see the output from terminal programs in bright colors, is there some sort of markup language that tells the...
I am trying to understand a c++ code that reads a dll explicitly.
Does any one know how the line "#define LFE_API(name) LFE_##name name" bellow actually works?
I understand "#define LFE_API(name) LFE_##name" but get confused about the last "name".
struct Interface
{
# ifdef LFE_API
# error You can't define LFE_API be...
I'm trying to determine what libc_write does exactly. I'm executing a binary on a processor simulator I designed in c++ and the program being run has jumped to the function call libc_write(). Now, there are 2 different types of write functions - write() which writes one large buffer to a stream, possibly comprised of many buffers that ...
I have experienced a strange problem in windows vista and above. When I use the IFileOpenDialog with a large stack, the amount of memory remaining after showing the dialog drops by about a gigabyte.
#include <windows.h>
#include <Shobjidl.h>
#include <iostream>
void memGrab(char *);
int main(int argc, char **argv){
char Message[128];...
Hello, everyone.
I ran into another problem a few days ago that I can't figure out. I am working with two mobile devices: TouchPro2, with Windows Mobile 6.1 Professional, and TouchPro2 with Windows Mobile 6.5 Professional. So, the hardware is the same, only the version of Window Mobile is different, and even then it's just a different b...
I faced this problem today and just wondering how to check if a new type defined with typedef is really defined somewhere. To give an example, I started using Xerces-c3 library that I built from source code and wrote a xml2text converter. But I couldnt find Xerces-c3 port on fbsd so installed Xerces-c2 library.
When I tried to recompil...
What can a programmer (one person) get from providing the community with opensourse (more or less) video transcoding library\wrapper? (I know we have Tao but it is not good for 2010...)
I think of video transcoder based on FFMpeg. simple wraper which would simplify FFmpeg bringing to C# such functions like ReadFrame(bytearray, framenum...
This is a bit of a newbie question. I am trying to add the OpenCV libraries to a QT project.
This question says the link flags are given by
pkg-config --libs opencv
If I paste the command line output into the project file like:
LIBS += -L/usr/local/lib -lml -lcvaux -lhighgui -lcv -lcxcore
then everything compiles fine, but now thi...
Possible Duplicates:
Why is it bad to use goto?
GOTO still considered harmful?
I was ramdomming through xkcd and saw this one (if also read some negative texts about them some years ago):
What is actually wrong with it? Why are goto's even possible in C++ then?
Why should I not use them?
...
I need a container that implements the following API (and need not implement anything else):
class C<T> {
C();
T& operator[](int); // must have reasonably sane time constant
// expand the container by default constructing elements in place.
void resize(int); // only way anything is added.
void clear();
C<T>::iterator be...
In VS2005 I have generated a web reference to a web service that takes a 1-dimensional array of strings ("inputArray") as an input parameter.
The proxy function generated for this web service call asks for two parameters:
BSTR *inputArray
int inputArray_nSizeIs
What is the proper syntax for passing in inputArray as a BSTR*? Currentl...