Hello,
I generated a DLL in Visual from a C++ code. Dependency Walker sees 3 functions exported as C functions.
I made an SCons project to do the generate the DLL, and 2 of the 3 functions are not seen as C functions.
What makes a function seen as a or C++ function, without modifying the code ? It must be in the compilation/linking op...
class X
{
protected:
void protectedFunction() { cout << "i am protected" ; }
};
class Y : public X
{
public:
using X::protectedFunction;
};
int main()
{
Y y1;
y1.protectedFunction();
}
This way i am able to expose one of the function of base class. Doesnt this violate the encapsulation principle
is there a specific r...
I am using the latest flash player and have a swf file served locally from my dev machine. In one container test app I am able to play the swf and make calls to it, but in my "Real" application the same code path results in com errors (basically it looks like the swf isn;' loading properly)
Additionally this is made more challenging be...
Hi there,
I am a programming student in my second OOP class, and I have a simple question that I have not been able to find the answer to on the internet, if it's out there, I apologize.
My question is this:
Is it possible have Boolean conditions in switch statements?
Example:
switch(userInputtedInt)
{
case >= someNum && <= some...
I'm running OSX 10.6 (Snow Leopard), Qt 4.6, VTK 5.4, and Cmake 2.8. I installed Qt, then VTK and Cmake. I configured VTK to use QT 4.6 (turned on VTK_USE_GUISUPPORT and VTK_USE_QVTK). The configuration and installation worked painlessly but if I run Cmake with Qt references the compilation fails during the subsequent make process becaus...
I have code that compiles fine with VC9 (Microsoft Visual C++ 2008 SP1) but not with GCC 4.2 (on Mac, if that matters). If I pile on enough qualifiers and keywords I can force it to work in GCC but this doesn't seem right.
Here's a minimal code sample exhibiting my problems:
template< typename N >
struct B {
typedef N n_type; ...
Possible Duplicate:
Why does C++ compilation take so long?
Hi,
I searched in google for the differences between C++ and Java compilation process, but C++ and Java language features and their differences are returned.
I am proficient in Java, but not in C++. But I fixed few bugs in C++. From my experience, I noticed that C++ a...
I am going to start a new C++ project that will rely on a series of libraries, including part of the Boost libraries, the log4cxx or the google logging library - and as the project evolves other ones as well (which I can not yet anticipate).
It will have to run on both 32 and 64 bit systems, most probably in a quite diverse Linux enviro...
Hi,
I want to test the rendering of a configured vhost before the hostname is set.
Exemple : view the webpage "otherNameOfMySite" located at mysite.com if the dns entry "otherNameOfMySite" doesn't exist (but the apache vhost is set).
My code :
webvhost = new QWebView();
QNetworkRequest * request = new QNetworkRequest(QUrl("http://mys...
Hey there I have this function:
void vdCleanTheArray(int (*Gen_Clean)[25])
{
}
I wanted to know what kind of array does it accepts and clear it.
Sorry, I have a little knowledge in c++, someone just asked me.
Thanks!
...
Hi,
Having A.dll which is a managed c++ project (no other dependencies)
From B.dll which is a C# project where A.dll is referenced having a Nunit method foo().
If calling the managed c++ code from foo() I got FileNotFoundException:The specified module could not be found. (Exception from HRESULT: 0x8007007E).
I tried to change B.dll to c...
does C++ allow to initialize struct using initializer list, {}, if struct has a defined constructor? could not find an answer, but g++ does not seem to allow it.
struct r { int a; };
struct s { int a; s() : a(0) {} };
r = { 1 }; // works
s = { 1 }; // does not work
...
Do I need a mutex if I have only one reader and one writer? The reader takes the next command (food.front()) from the queue and executes a task based on the command. After the command is executed, it pops off the command. The writer to the queue pushes commands onto the queue (food.push()).
Do I need a mutex? My reader (consumer) only e...
I have a design question. Is it better to define separate classes for SENDING and RECEIVING. Or, is it better to define a single Thread class? I like the idea of a single Thread class because it is easier to share a queue which can be locked by mutex.
Design Option #1 (Separate):
mySendThread = new SendThread(); // Have thread properti...
Hi,
I'm wondering if anyone has any ideas as to how I can host the Silverlight ActiveX control in an MFC application. I have been able to find information on this online, but everything that I have found is related to ATL or C# and so far I have been unable to translate any of this into my MFC application:
Silverlight Alternative Hosti...
I was looking for solving a LCS problem (Longest common subsequence) and I tried to make my own code in c++ by referring to the explanation and the pascal code given at wikipedia.
My final result was this:
#include <iostream>
#include <algorithm>
using namespace std;
int LCS(int a[100], int b[100], int m, int n);
int main()
{
int ...
Hi, I have a problem where I get an int as input at the wrong time in my c++ program, so I need to "put it back" on cin later. However the closest thing I can find to do this is the pushback function for istreams. This sadly is only for characters and using multiple characters seems to separate them. Is there a good way to put a piece...
I just came across this post and found a very elegant way of initializing maps
http://stackoverflow.com/questions/138600/initializing-a-static-stdmapint-int-in-c/1730798#1730798
So i wanted to start a thread in which we can list such idioms. They surely make you appreciate the power and expressiveness of C++
...
Hello C++ Gurus,
I have been using stl vector a lot, and recently I asked this question to myself,,, "How is stl vector implemented"
I had two options:-
1) Linked list:- and then making the api to feel like random access (overloading [])
2) using new for e.g. DATA *temp = new DATA[20]:- I believe they do sth like this but then ...
I have an old MFC utility written with VS2008 project. We have used this utility for a few years now and I have never experienced this problem personalty but it is showing up more and more often on customers computers.
Sub dialogs launched from my main dialog will have their buttons blackened out. I have included a screenshot from one ...