I am creating a IE toolbar in c++ .when the window is resized some of toolbar items are not visible. I want to build a menu in which all those items that are not visible can be added .But i dont know how to do it ?
Can anybody help me ?
Thanks in advance
...
I have this snippet of the code
Stack& Stack:: operator=(const Stack& stack){
if(this == &stack){
return *this
}
}
here I define operator = but I can't understand, if I receive by reference stack why it should be & in this == &stack and not this == stack and why we return * in return *this and not this thanks in advance f...
When you have an out of process COM Server and you call a function from a Client inside this server from Thread X inside the client, then how this function get executed in the COM Server?
In the thread its currently executing on, or on its main thread?
...
Let's discuss these two functions:
complex& operator+=(const T& val);
complex operator+(const T& val);
Where "complex" is a name of a class that implements for example complex variable.
So first operator returnes reference in order to be possible to write a+=b+=c ( which is equivalent to b=b+c; a=a+b;).
Second operator returnes and...
I'm currently trying to solve a problem that's similar to http://stackoverflow.com/questions/2338716/testing-intersection-of-two-regular-languages with the exception that I know how to do the intersection, but have an additional requirement.
The intersection logic I intend to use is the Dragon Book's algorithm for converting an NFA to a...
I'm working with physx (trying to add ik to ragdoll) at the moment. For some reason, all ragdoll joints are frictionless, and as a result, ragdoll tend to "wobble", especially when it is hung in the air and is connected to several moving kinematic actors.
I would like to add friction to the joints and make them "stiff". Imagine a door (...
Could someone please explain the difference in how the 2 snippets of code are handled below? They definitely compile to different assembly code, but I'm trying to understand how the code might act differently. I understand that string literals are thrown into read only memory and are effectively static, but how does that differ from the ...
Possible Duplicate:
What is a translation unit in C++
Hello All,
Suppose, we have a big Class. and we don't want to break it.
In order to maintain code suppose we have created a multiple example1.cpp, example2.cpp, example3.cpp files for single example.h file for class cexample.
Does this correspond to multiple compilations ...
For example concept of Templates in C++ are for comfort as compiler generates some additional code, for your class or for your function, isn't it? So we could live without template by doing some additional (manual work).
What about virtual functions???
Are there any situations where both of them are irreplaceable?
...
I'm using a C++ library (it happens to be in an iPad application, but I'm not sure that should make any difference) and would really like to have the headers pre-compiled to speed up the builds, but xCode seems to run the pre-compiled header file through the C compiler rather than the C++ one.
Is there a way to get it to use the right c...
Is it possible to get the virtual address as an integer of a member function pointer?
I have tried.
void (AClass::*Test)();
Test =
int num = *(int*)
But all that does is get me the virtual address of a jmp to the function. I need the actual functions virtual address.
...
My application problem is the following -
I have a large structure foo. Because these are large and for memory management reasons, we do not wish to delete them when processing on the data is complete.
We are storing them in std::vector<boost::shared_ptr<foo>>.
My question is related to knowing when all processing is complete. Fir...
How do I apply the "mac style" on my forms and windows?
Using Qt (C + +)
...
Here's a small test program I wrote:
#include <iostream>
using namespace std;
class A {
public:
int val;
A(int _val=0):val(_val) { }
A operator+(A &a) { return A(val + a.val); }
A operator-(A &a) { return A(val - a.val); }
friend ostream& operator<<(ostream &, A &);
};
ostream& operator<<(ostream &out, A &...
I read a bit about a previous attempt to make a C++ standard for embedded platforms where they specifically said multiple inheritance was bad and thus not supported. From what I understand, this was never implemented as a mainstream thing and most embedded C++ compilers support most standard C++ constructs.
Are there cases where a co...
I have a file with millions of URLs/IPs and have to write a program to download the pages really fast. The connection rate should be at least 6000/s and file download speed at least 2000 with avg. 15kb file size. The network bandwidth is 1 Gbps.
My approach so far has been: Creating 600 socket threads with each having 60 sockets and us...
I have no idea what is wrong with the simple code. The function is for use with python and ctypes.
extern "C" void add_lines(bool antialias,GLdouble coordinates[][2],int array_size,GLdouble w,GLdouble r,GLdouble g, GLdouble b,GLdouble a){
glDisable(GL_TEXTURE_2D);
if (antialias){
glEnable(GL_LINE_SMOOTH); //Enable line s...
I'm trying to compile a release version of love2d on windows. I got all the dependencies downloaded / compiled. However, I have one last problem that I cannot fix:
The object or library file
'lib\libmodplug.lib' was created with
an older compiler than other objects;
rebuild old objects and libraries
I had similar issues with ...
I was going over some sample questions for an upcoming test, and this question is totally confusing me. Any help would be appreciated.
Consider the following code:
class GraduateStudent : public Student
{
...
};
If the word "public" is omitted, GraduateStudent uses private inheritance, which means which of the following?
Graduat...
I'm currently working in a codebase where IPv4 addresses are represented as pointers to u_int8. The equality operator is implemented like this:
bool Ipv4Address::operator==(const u_int8 * inAddress) const
{
return (*(u_int32*) this->myBytes == *(u_int32*) inAddress);
}
This is probably the fasted solution, but it causes the GCC co...