C++ template typedef?

I have a class template<size_t N, size_t M> class Matrix { // .... }; I want to make a typedef which cr...

OpenGL nvoglv32.dll error?

My program compiles fine but when I run it, it crashes at glDrawArrays(GL_TRIANGLE_STRIP, 0, 4) saying: Unhandled e...

How to solve the error LNK2019: unresolved external symbol - function??

I get this error, but I don't know how to fix it. I'm using Visual Studio 2013. I made the solution name MyProjectT...

Convert std::string to QString?

I've got an std::string content that I know contains UTF-8 data. I want to convert it to a QString. How do I do that...

delete vs delete[] operators in C++?

What is the difference between delete and delete[] operators in C++? ...

What does “-Wall” in “g++ -Wall test.cpp -o test” do??

-o changes the output filename (I found that using --help) But I can't find out what -Wall does? ...

c++ compile error: ISO C++ forbids comparison between pointer and integer?

I am trying an example from Bjarne Stroustrup's C++ book, third edition. While implementing a rather simple function...

Printing a char with printf?

Are both these codes the same char ch = 'a'; printf("%d", ch); Will it print a garbage value? I am confused abo...

Easiest way to convert int to string in C++?

What is the easiest way to convert from int to equivalent string in C++. I am aware of two methods. Is there any ea...

How to get the GL library/headers??

#include <gl\gl.h> #include <gl\glu.h> #include <gl\glaux.h> This is an example, but where to ...

What do (n&(n-1))==0 and n&(n-1)==0 do in C++??

What do (n&(n-1))==0 and n&(n-1)==0 do (n is an integer) in C++? if ((n&(n-1))==0) { // do somethin...

srand(time(0)) and random number generation?

srand(time(0)) is used in C++ to help in the generation of random numbers by seeding rand with a starting value. ...

C++: std does not have member “string”?

I have coded the following: STDMETHODIMP CWrapper::openPort(LONG* m_OpenPortResult) { std::string str; //co...