c++

What programming language is IIS written in?

I'd like to know this information for IIS versions 6.0, 7.0 and 7.5. ...

How can I measure the execution time of a for loop?

I want to measure the execution time of for loops on various platforms like php, c, python, Java, javascript... How can i measure it? I know these platforms so i am talking about these: for (i = 0; i < 1000000; i++) { } I don't want to measure anything within the loop. Little bit modification: @all Some of the friends of mine a...

c++ array access through pointer

A simple question about accessing array information through pointers that I can't seem to figure out. I'm passing a bunch of multi-dimentional arrays into a function. Now they are not dynamic but even if static, I have to pass them as pointers right? (If I'm wrong, please do correct me) So once I do pass them into a function, how do I a...

Continue to debug after failed assertion on Linux? [C/C++]

When an assertion fails with Visual C++ on Windows, the debugger stops, displays the message, and then lets you continue (or, if no debugging session is running, offers to launch visual studio for you). On Linux, it seems that the default behavior of assert() is to display the error and quit the program. Since all my asserts go through ...

How can I display Unicode strings while debugging on linux?

I have been working for some years now as C++ Developer using MS Visual Studio as working platform. Since I privately prefer to use linux, I recently took the chance to move my working environment to linux as well. Since I have been optimizing my windows environment for several years now, of course it turns out several things are missin...

How to make-up/redesign/change-all-functions-and-variable-names of a program

Hi, I have a program in C/C++ code, and I wonder what approaches/programs/methodologies can be used to: change automatically or following some rules a) all variable and function names of the program b) redesign it completely: change indentation, order of how functions appear on the code, etc So at the end, the program compiles again...

C++ STL unordered_map problems and doubts

Hello, after some years in Java and C# now I'm back to C++. Of course my programming style is influenced by those languages and I tend to feel the need of a special component that I used massively: the HASH MAP. In STL there is the hash_map, that GCC says it's deprecated and I should use unordered_map. So I turned to it. I confess I'm n...

DO's and Donts while using pointers

Its a simple but important question. What are the do's and donts while using a pointers in C and C++ so as to make sure SEGMENTATION FAULT is avoided on AIX? Where char * are preferred over character array? ...

Calculating variance with large numbers

I haven't really used variance calculation that much, and I don't know quite what to expect. Actually I'm not too good with math at all. I have a an array of 1000000 random numeric values in the range 0-10000. The array could grow even larger, so I use 64 bit int for sum. I have tried to find code on how to calc variance, but I don't ...

using managed C++ dll on a shared web server without the need to register it on the GAC

I wrote a managed C++ dll that I update and post via ftp to the bin folder of my web on a shared host web server. However when I change the dll and upload it it gives me an error: COMException (0x800736b1) FileLoadException: Could not load file or assembly I should add that the dll is compile with the /clr option since it uses static ...

Is there any recycling pool structure in C++ Boost?

I need a pool struct that can reuse/recycle the memory after usage, i.e., DON'T do any allocation or deallocation on-the-fly (although you still need to allocate the memory at the moment when the program starts) Boost.Pool does not support such a mechanism; is there any alternative? ...

C++ libraries for rendering PDFs

I'm looking for a (preferably LGPL'ed) PDF-rendering library that I can use on Mac OS X, Windows and Linux using C++. So far I found:(updated with content from answers below) Poppler GPL very easy to use Qt4-backend GhostScript GPL (depending on the version of GhostScript) command line only does not support PDF boxes MuPDF (Sumatr...

What creates the stack?

Suppose in a program we have implemented a stack. But who creates the stack ? Is it the processor, or operating system, or compiler? ...

c++ virtual class, subclass and selfreference...

consider this class: class baseController { /* Action handler array*/ std::unordered_map<unsigned int, baseController*> actionControllers; protected: /** * Initialization. Can be optionally implemented. */ virtual void init() { } /** * This must be implemented by subclasses in order to implement...

xerces-c 2.8 : error while loading shared libraries

Hi, I'm trying to compile a program running on an HP UX server on a Red Hat Linux. It uses xerces-c library to parse xml files. Compilation is ok, but when i try to run it, I get the following message ./a.out: error while loading shared libraries: libxerces-c.so.28: cannot open shared object file: No such file or directory ...

Looking for an implemenentation of binomial tree in c++

If anyone can point me into direction where i can find an easy to understand impl. of binomial tree, that would be very helpful. thx tree should look like in this article: http://software.intel.com/en-us/articles/high-performance-computing-with-binomial-option-pricing-part-1/ ...

Common way to call mother-class operator= in C++?

Let's suppose I have a class Dog that inherits from class Animal, you might want to insert a call to Animal::operator= in Dog::operator=. What is the most readable/common way to write it? I think I know those two... static_cast<Animal*>(this)->operator=(other); and this->Animal::operator=(other); ...

how to link c++ program with HTML page???

i am working on php...!! Is it possible to link HTML page to c++/c at back end. means instead of php script i want to run c/c++ if Yes How?? ...

C++ STL: Custom sorting one vector based on contents of another

This is probably best stated as an example. I have two vectors/lists: People = {Anne, Bob, Charlie, Douglas} Ages = {23, 28, 25, 21} I want to sort the People based on their ages using something like sort(People.begin(), People.end(), CustomComparator), but I don't know how to write the CustomComparator to look at Ages rather than...

Does Blitz++ use BLAS routines when it is possible and appropriate to

I know that Blitz++ gets its performance plus by extensive usage of expression templates and template metaprogramms. But at some point you can't get more out of your code by using these techniques - you have to multiply and sum some floats up. At this point you can get a final performance kick by using the highly optimized (especially fo...