Say you have:
struct c_struct {
int value;
/* other stuff */
void (* dump)();
};
and you'd like to, at some point:
c_struct_obj->dump();
I assume there's no way you could instantiate a c_struct object such that its particular "dump" function knows its particular "value" the way C++ methods know member variables (via the im...
As we all know, in Visual Studio there are two predefined configurations - Debug and Release. I have been using them since I started programming and soon learnt their differences. However recently I had to create my own configurations and now I have a question: Are those two configurations defined/determined solely by their parameters/op...
I successfully compiled and installed the latest version of the Boost library onto my linux machine.
Now, I would like to be able to use pkg-config to ease the process of providing linking paremeters with GCC.
Since I am too lazy for hand-coding my own .pc file, is there a script/tool which would automatically generate the needed .pc fi...
hello, can anyone give me an example of function overloading in c++ with 4 function prototypes ? i still don't get them quite good ..
sorry newbie question, thanks for looking in.
Adam Ramadhan
...
std::auto_ptr lacks const copy constructor, therefore I cannot use it directly in collections. is there some way to have for example vector of std::auto_ptr without using boost pointer collection template?
...
I tried do do this:
Ogre::Vector3 src = bone1->_getDerivedOrientation() * Ogre::Vector3::UNIT_X;
Ogre::Quaternion quatt = src.getRotationTo(bone2->_getDerivedOrientation() * Ogre::Vector3::UNIT_X);
bone1->rotate(quatt);
src = bone1->_getDerivedOrientation() * Ogre::Vector3::UNIT_Y;
quatt = src.getRotationTo(bone2->_getDerivedO...
My Application reads from a Named Pipe and the Problem is, ReadFile returns after the buffer is full or a timeout elaps. I wait for the last bytes to read up to 20 Seconds. Ich have test ist with smaller buffer, but Windows set buffer always to 1020 Bytes. I can't manipulate the Pipe on the other side. The Pipe runs on local Computer.
If...
I have a vector of doubles. I want to sort it from highest to lowest, and get the indices of the top K elements. std::sort just sorts in place, and does not return the indices I believe. What would be a quick way to get the top K indices of largest elements?
...
hello
i want to write my own download manager using c++(qt4) but i have no idea about that so
please suggest me from where should i start if you know any good tutorial or link the please
post it.
i also want to implement the pause/resume and multiple download features also.
i already know that there is a long list of download mana...
Difference between references and pointers and constant pointers in C++
...
Hello. I am using the excellent asio for an asynchronous network client. When handling read (async_read) I am concerned that the method/function handling the data might hang or take too long (the function is supplied by the user of the class).
What is the best way of calling the supplied function and ensuring it won't take too long ? ...
I have following two classes:
template <size_t size>
class Cont{
public:
char charArray[size];
};
template <size_t size>
class ArrayToUse{
public:
Cont<size> container;
inline ArrayToUse(const Cont<size+1> & input):container(reinterpret_cast<const Cont<size> &>(input)){}
};
I have three following lines of code at global scope:
c...
Where can I find the .net API for the Dialogic D/4PCI. This is an older card. Also, what are other alternatives for an API. I would prefer to work in either C# (.net) or Java.
...
I'm developin' network game, where players would monitor game news in their client app (Iphones). There would be one server (php based service with mysql) and client with preinstaled my app.
Each user will send (may not to send) information about their location to the server (that is easy) and server will write it to the game's database...
Hi,
I'm developing an application which will need to copy files that are locked. I intend on using the Volume Shadow Copy service in Windows XP+ but I'm running into a problem with the implementation.
I am currently getting E_ACCESSDENIED when attempting calling CreateVssBackupComponents() which I believe is down to not having backup ...
Does anyone know a simple way to check if two polygons, especially rectangles, are colliding? I found a simple way to see if two are touching by just checking if any lines on the two rectangles are colliding, but this will not work if one polygon is in another. Does anyone know a more efficient way to do this or just a way that works?
...
First of all, I want to make myself clear that I do understand that there is no notion of vtables and vptrs in the C++ standard. However I think that virtually all implementations implement the virtual dispatch mechanism in pretty much the same way (correct me if I am wrong, but this isn't the main question). Also, I believe I know how v...
Hello I write LSP program for reading and changing traffic. Questions is, do software like anti virus, firewall, anti spyware etc see my program as virus because LSP function?
...
I have a legacy msvs2005 c++ project library (dll). I opened project on WindowsXP workstation with msvs2008 installed and code compiled fine. But when I try to use it with executable module i observe "my-library.dll or one of it's dependencies were not found".
Dependency Walker tells me that MSVCP80.DLL, MSVCR80.DLL, MSVCR90D.DLL are m...
Hi, I am trying to override the = operator so that I can change my Point class into a Vector3 class.
Point tp = p2 - p1;
Vec3 v;
v = tp;
The problem I am facing is that, "v" will have its x,y,z members equal to zero all the time.
Vec3.h:
Vec3 operator =(Point a) const;
Vec3.cpp:
Vec3 Vec3::operator =(Point a) const
{
...