First  |  Prev |  Next  |  Last
Pages: 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
"PORTING C" > when to cast parameters?
Hello, Quick question! Since I have a quite a few variables which must stay as 8 bits, I find myself having to pass many of these to functions as parameters. So if I had: int x; I am now calling it: unsigned char x; To me, "x" is still an 8 bit value which actually simulates my old int's. Howe... 13 Jan 2010 22:14
Can not deduse template arguments std::rel_ops
Another question. When I include std::rel_ops before the main() my code compiles. When I include the operators inside the main the compiler issues errors. May I use using std::rel_ops::operator !=; using std::rel_ops::operator >; using std::rel_ops::operator <=; using std::rel_ops::operator >=; stat... 13 Jan 2010 09:50
Using std::less_equl predicate with std::min()
When I use std::less_equal predicate with the std::min() algorithm (tu change the order of returned elements in case they are equal) the Visual C++ 2005 EE abort my program in the internal function bool __CLRCALL_OR_CDECL _Debug_lt_pred() reporting the following _DEBUG_ERROR2("invalid operator<", _Wher... 21 Jan 2010 05:39
volatile keyword and memory barriers
I am confused, the Wikipedia article http://en.wikipedia.org/wiki/Double-checked_locking claims that VC++ volatile keyword includes a memory barrier however if I compile the following program: volatile int n1; volatile int n2; int main() { ++n1; ++n2; } I get the following output: _main PROC ... 8 Jan 2010 18:28
deleting pointers in a list.
Hello, I try to delete the elements of a linked list with the fonction clear but according to the result only the first element gets deleted, after there are only 0's. Perhaps do you know what to do about it. Thanks. #include <iostream> using namespace std; class linked_list { public: linked_list... 7 Jan 2010 15:50
Linking with static libs built with MinGW
Hello, I noticed that when I link my application with static libraries built with MinGW/gcc (like ffmpeg), the apllication size is increased by the size of these libraries - even though I don't use most of their code. To verify this guess, I reconfingured and rebuilt the libs, excluding a lot of unused features ... 7 Jan 2010 18:06
Cannot receive TTN_NEEDTEXT for tooltips
I try to show tool tips for dialog toolbars. But I don't see any notifications of TTN_NEEDTEXT. Basically I have added ON_NOTIFY_EX(TTN_NEEDTEXT, 0, OnToolTipNotify) in my dialog message map. I also added the following line, EnableToolTips(TRUE); in OnInitDialog(). I cannot think what causes the notificati... 6 Jan 2010 09:52
Path as argument to c programme
I generally use Visual Basic both vb6 and dot net variants. Now I am using console visual c. The problem is that I need to get an argument from the user as to the working directory such as "E:\work\project\data" In c we have to use "E:\\WORK\\project\\data" How to I append the extra "\" to the string? Seaso... 6 Jan 2010 09:52
BitBlt a bitmap in memory
Dear all, It is common to know that you can load a bitmap from resource or from a file, is it possible to "Blit" a bitmap from memory directly? I've been searching the web, and only found those 2 examples. So thanks Jack ... 6 Jan 2010 09:52
Please vote for bug 522094: warning C4717 + stack overflow!
The following little program gets an unexpected warning (C4717, "recursive on all control paths error"), and even worse: a stack overflow at runtime. ////////////////////////////////////////////////// class Bar { public: virtual ~Bar() {} Bar() {} template<typename U> explicit Bar(U) {} ... 3 Jan 2010 06:12
First  |  Prev |  Next  |  Last
Pages: 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28