Reference to non-static member function must be called

The problem is that buttonClickedEvent is a member function and you need a pointer to member in order to invoke it. Try this: And then when you invoke it, you need an object of type MyClass to do so, for example this: http://www.codeguru.com/cpp/cpp/article.php/c17401/C-Tutorial-PointertoMember-Function.htm

gcc: undefined reference to

However, avpicture_get_size is defined. No, as the header (<libavcodec/avcodec.h>) just declares it. The definition is in the library itself. So you might like to add the linker option to link libavcodec when invoking gcc: Please also note that libraries need to be specified on the command line after the files needing them: Not like this: Referring to Wyzard‘s comment, the complete command might look like … Read more

generate random double numbers in c++

Here’s how Remember to call srand() with a proper seed each time your program starts. [Edit] This answer is obsolete since C++ got it’s native non-C based random library (see Alessandro Jacopsons answer) But, this still applies to C

Using C-string gives Warning: “Address of stack memory associated with local variable returned”

Variable char* matches[1]; is declared on stack, and it will be automatically released when current block goes out of the scope. This means when you return matches, memory reserved for matches will be freed, and your pointer will point to something that you don’t want to. You can solve this in many ways, and some of them are: Declare matches[1] as static: static char* … Read more

How to project a point onto a plane in 3D?

1) Make a vector from your orig point to the point of interest: v = point-orig (in each dimension); 2) Take the dot product of that vector with the unit normal vector n: dist = vx*nx + vy*ny + vz*nz; dist = scalar distance from point to plane along the normal 3) Multiply the unit … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)