I'm having trouble implmenting the 3rd parameter in the function documented here:
http://www.boost.org/doc/libs/1_39_0/doc/html/boost_asio/reference/async_read_until/overload4.html
What I'd like to be able to do is use the callback on the 3rd parameter of async_read_until to detect when a complete chunk has arrived. My packets have the f...
Are there any compelling performance reasons to choose static linking over dynamic linking or visa versa in certain situations? I've heard or read the following, but I don't know enough on the subject to vouch for their veracity.
1) The difference in performance between static linking and dynamic linking is usually negligible.
2) (1) i...
Whenever boost's numeric_cast<> conversion fails, it throws an exception. Is there a similar template in boost that lets me specify a default value instead, or is catching the exception the only thing I can do in this case?
I'm not too worried about the performance of all the extra exception handling, but I'd rather use a standard templ...
How should I implement more than 8 lights in OpenGL?
I would like to render unlimited amounts of lights efficiently.
So, whats the preferred method for doing this?
...
Hello everybody.
I have been trying to implement my own linked list class for didactic purposes.
I specified the "List" class as friend inside the Iterator declaration, but it doesn't seem to compile.
These are the interfaces of the 3 classes I've used:
Node.h:
#define null (Node<T> *) 0
template <class T>
class Node {
public:
...
Hi, I met some compilation error but do not know what the problem is. The code seems not use exception, but the error is about it.
//in misc.h:
char *basename(char *name); // line 94
// in misc.cc:
char *basename(char *name) { // line 12
char *result = name;
while(*name) {
if(*name == '/') result = name + 1;
name++;...
This is probably something very obvious, but I have a new to Qt and can't figure it out. I have a simple MainWindow which has one button. When that button is clicked I want to create a QGraphicsScene, add a few lines and then show that in the Window. However when I run this code in a Window it does not show up.
BUT, if I run this as a ...
I have a software, code of which I have modified and run make again.
If I run the modified code in a black QtCreator project it runs well (nothing specific to Qt, just an example), but if I compile with software's original makefile, I get error on a line as:
(*F)=(double**) malloc((size_arr)*sizeof(double*));
Not in compile time, but...
What does v indicate in vtable or vptr
...
#include<iostream>
using namespace std;
int main()
{
int *p,*c;
p=(int*)10;
c=(int*)20;
cout<<(int)p<<(int)c;
}
Somebody asked me "What is wrong with the above code?" and I couldn't figure it out. Someone please help me.
...
I'm merging a static library (assimp) into an existing project (Spring RTS) where both the library and the project are under regular development. I'm trying to add the library in such a way that I can easily repeat the integration as new releases come out.
Anyway, the issue is that Spring requires the library to perform all maths using ...
Could someone point me whats wrong with this code please? I'm having a very hard experience in mixing C++ and MC++. I have read a lot of blogs and tutorial regarding this subject (passing delegates) but now that looks my code is ok (its compiling and runs well when in debug mode and step by step) it crashs.
The main problem is that it n...
I download Neoncube downloader and tried to compile. After I resolved some linking issues, there's still three that I can't solve.
1>main.obj : error LNK2019: unresolved
external symbol _UnEmbedBrowserObject
referenced in function "long stdcall
NoticeWindowProcedure(struct HWND
*,unsigned int,unsigned int,long)" (?NoticeWindo...
hi,
i am working on a win32 app. i am currently using the text file which has tab delimited data as a source. i want to embed this as a resource so that i need not worry about shipping this file along with .exe file.
can anyone tell me how to do it?
...
I'm looking to write a small program which will intercept network packets (on the local machine) and modify them before they go out on the network. I need to be able to modify the headers as well, not just the data.
I've already looked through several possibilities but am unsure which one is best to pursue. There are open source packet ...
I want to detour EndScene from an arbitrary DirectX 9 application to create a small overlay. As an example, you could take the frame counter overlay of FRAPS, which is shown in games when activated.
I know the following methods to do this:
Creating a new d3d9.dll, which is then copied to the games path. Since the current folder is sea...
Is there a better way to initialise C structures?
I can use initialiser lists at the variable declaration point; however this isn't that useful if all arguments are not known at compile time, or if I'm not declaring a local/global instance, eg:
Legacy C Code which declares the struct, and also has API's using it
typedef struct
{
i...
Hi!
Is there a tool, maybe a plugin for visual Studio or so, that visualizes for me the memoryalignment of my classes and structs?
thx!
...
Hey,
So i need to design something like that :
I have a spreadsheet which can contain numerous sheets (maybe of different kinds).
each sheet has let's say 1A-9Z cells.
in each cell i can have one the above :
String,
Number,
Formula - which means the cell gets an operation like +,-,/,* etc... and cells numbers,
and in the cell i have ...
Hi!
I'm trying to use a class member as a callback but the compiler gives me the following error:
Error 2 error C2440: 'type cast' : cannot convert from 'void (__stdcall CWaveIn::* )(HWAVEIN,UINT,DWORD_PTR,DWORD_PTR,DWORD_PTR)' to 'DWORD_PTR'
Is it possible to use a member function as a callback this way? and how do I convert the std...