c++

How to develop pear of PHP in C++

Hi all, I have used PHP a lot , and now i want to give back PHP community some contribution but for this I need help from experts , What i want to know is how to develop PHP pears in C++ or can suggest links or path way for it ...

Gecko XPCOM usage vs WebKit

I need to embed a web browser in C++ application. As well, I need to reach its javascript methods from Delphi components. I know that for FF there is Gecko with XPCOM. Is there something like this for WebKit? ...

How to ensure only one process is created by CreateProcess when calling concurrently in c++?

Quoted from here: BOOL WINAPI CreateProcess( __in_opt LPCTSTR lpApplicationName, __inout_opt LPTSTR lpCommandLine, __in_opt LPSECURITY_ATTRIBUTES lpProcessAttributes, __in_opt LPSECURITY_ATTRIBUTES lpThreadAttributes, __in BOOL bInheritHandles, __in DWORD dwCreationFlags, __in_opt LPVOID lp...

Linked List of Intervals

Hello I have the following two questions. I'm aware of the concept of a linked list. What is a linked list of intervals? I need to store a very huge (more than 100 bits) number in C/C++ and perform bitwise operations on it. Without using any big number library, what would be the best data structure to handle this scenario ? Thank Yo...

Knowing if function is taking reference or value at runtime

So this is a purely academic question, mostly as its been a while since I've done anything too complex in C++. But is there any way to know if a method is taking a paramter as a reference or a value? This isn't important for pointers, as if you try to pass a non-pointer to a method that takes a pointer, you get a compile error. But somet...

which version of Visual C++ runtime libraries is necessary?

Hello, Does the latest vcredist from microsoft (version 2010) include the previous versions (2008 SP1 and 2005 SP1) or do I need to install all 3 of them? Thank you. ...

_matherr does not get called when built into a DLL

I have a basic solution file (.sln) where I was able to reproduce a problem I have been facing recently. It contains 3 projects: 1.) MathTest.lib - containing methods that might cause a mathematical error, like acos(1.1). 2.) MathTestDll.dll - calls the methods from the above lib. 3.) UnitTest.exe - calls the exported method in the DLL ...

Prototype parameter names

In my header, I have a prototype declaration like this: void move(int, int); I can omit the parameter names, that's how I'm used to it from C. I do that so that I don't have to keep the parameter names in sync - it's extremely confusing if they differ between prototype and implementation. Right now, I'm documenting all of my code wit...

Calling virtual function in subclass from superclass

Hello StackOverflow I know this question must have been covered endless of times, but I've searched the previous questions, and nothing seems to pop. It's about inheritance and virtual functions i C++. I have a problem with calling virtual functions in subclasses from the superclass. Let me give an example. Start of with three classes...

Which version of visual C++ runtime libraries

Hello, does the 2010 vcredist package from microsoft contain the 2008 SP1 version and the 2005 SP1 version? ...

Inline functions in C++

Hii , I am a novice in C++. I did read about inline functions and understood them right. But this site says that "We get an 'unresolved external' error if we write the definition of an inline function in one .cpp file and call it from another file....why is that so ... ? This can be done for normal functions right...Please correct me if...

Mixing Haskell and C++

Hi If you had the possibility of having an application that would use both Haskell and C++. What layers would you let Haskell-managed and what layers would you let C++-managed ? Has any one ever done such an association, (surely) ? (the Haskell site tells it's really easy because Haskell has a mode where it can be compiled in C by gcc...

Doxygen hide source files

Hello, I just started using Doxygen to generate documentation for my libraries and I found one minor glitch I can't get around. In the tree view there's the file list and you can click on one of the files and then get the source code. I found a way to get rid of the file list but then I can't see the enums anymore. Do you know any wa...

How to create a process by a "LPTHREAD_START_ROUTINE lpStartAddress" alike argument?

I want to create a process with syntax similar to the following,except that I don't want to create a thread: hThread = CreateThread( NULL, // no security attribute 0, // default stack size InstanceThread, // thread proc (LPVOID) hPipe, // thread parameter ...

C++ : Multiple inheritance with polymorphism

Hi, (pardon the noob question in advance) I have 4 classes: class Person {}; class Student : public Person {}; class Employee : public Person {}; class StudentEmployee : public Student, public Employee {}; Essentially Person is the base class, which are directly subclassed by both Student and Employee. StudentEmployee employs multip...

Visual-C++ 2008 vs Visual-C++ 2010 - what has changed?

Possible Duplicate: How to find whats new in VC++ v10? Visual-C++ 2008 vs Visual-C++ 2010 - what has changed? What are + and - of new VC++? ...

const_reference or iterator for map (when not actually iterating)

I have some code that uses an iterator to loop through all elements of an unordered_map, but within that loop there are several other processes where I store iterators to particular elements in the map, and generally do lots of jumping around but not iterating (excluding the outermost iterator). It seemed to me that it may be more suita...

Doxygen link to const function

Hi, I've got the following function prototype: bool key_pressed(enum key key) const; I documented it using doxygen. Now I have an overloaded version of that function that does the same, so I wanted to copy the doxygen comment like this: /// @copydoc key_pressed(enum key) const bool key_pressed(char key) const; This does not work, ...

postfix and prefix increment operator in a for loop

Possible Duplicate: Difference between i++ and ++i in a loop? Can anyone explain what's the difference between those: for(unsigned col = 0; col < n; ++col, num_to_fill >>= 1U) { for(unsigned row = num_to_fill; row < (1U << n); row += (num_to_fill * 2)) { std::fill_n(&output[col][row], num_to_fill, 1); } }...

Strange Multiple Definitions Error

Hi all, I have something like this in my code: namespace A { namespace B { void GetLine(std::istream& stream, std::string& line) { line.clear(); while (stream.good()) { std::getline(stream, line); boost::trim(line); if (not line.empty()) break; } boost::to_upper(line); } } } And I get multipl...