Concepts didn't make the C++0x standard, but Boost still provides The Boost Concept Check Library (BCCL). I guess that BCCL doesn't cover everything that was meant to into the C++0x standard. What is the difference between BCCL and the proposed C++0x solution?
...
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
Why define these tags ?
CSortHeaderCtrl::CSortHeaderCtrl()
: m_iSortColumn( -1 )
, m_bSortAscending( TRUE )
{
}
What is the two functions after colon used for ?
BEGIN_MESSAGE_MAP(CSortHeaderCtrl, CHeaderCtrl)
//{{AFX_MSG_MAP(...
I want some examples of C preprocessor directives, such as:
#define pi 3.14
#define MAX 100
I know only this.
I want to know more than this, more about preprocessor directives.
...
I have a variable that I'm using like a constant (it will never change). I can't declare it as a constant because the value gets added at runtime.
Would you capitalize the variable name to help yourself understand that data's meaning?
Or would you not because this defies convention and make things more confusing?
The larger question:
...
I have a COM object that I'm trying to use from C++ (not .NET), and all of the example programs and manual are written assuming the use of C#.NET or VB.NET. COM is new to me so I'm a bit overwhelmed. I'm using #import on the TLB but am struggling to deal with the variants that are used as parameters. I have one particular method, that ac...
Hi guys! I have two questions:
How would I use the WMI to determine the type of hard drive present on the computer? I'm currently using the Win32_DiskDrive Class, and calling the InterfaceType property, however, it reports SATA hard drives as IDE.
Is there any way of correctly determining the type of hard drive present?
I am trying...
When I try to build my c++ library (in both static and dynamic mode) using visual studio 2008, in the debug folder, instead of .lib or .dll file, some .obj files are created along with an .idb and an .pdb file.
how can I make visual studio build the library file?
...
I'm doing some fairly simple cross-platform TCP socket programming. I have unfortunately found out that when compiled on Windows, my sockets are non-blocking by default, while on OS X they are blocking by default. How do I force a socket into blocking mode on Windows? Do they normally default to non-blocking mode or is something terribly...
Quick sanity check: Is it possible to subclass a window using a functor? I'm running into a situation where I want to have some data available in the win proc, but GWLP_USERDATA is already being used. A functor seems like a good alternative, but I'm having trouble getting it to work.
Here's the basics:
class MyWinProc { // Win Proc Fun...
All I need is get MinGW talking to Postgres. I've considered several options:
Use libpq. The libpq.lib that comes with Postgres for Windows links okay, but crashes when I use the library. I think because it was compiled for VC++. I can't find just the libpq code, so I'd have to recompile the entire Postgres tree in MinGW. Not easy...
I have a class (NamedPipeManager) which has a thread (PipeThread) that waits for a NamedPipe connection using (ConnectNamedPipe) and then reads (ReadFile) - these are blocking calls (not-overlapped) - however there comes a point when I want to unblock them - for example when the calling class tries to stop the NamedPipeManager...
How ca...
Hello,
Sorry to ask a similar question to the one i asked before (FFT Problem (Returns random results)), but i've looked up pitch detection and autocorrelation and have found some code for pitch detection using autocorrelation.
Im trying to do pitch detection of a users singing. Problem is, it keeps returning random results. I've got s...
When do we get "l-value required" error...while compiling C++ program???(i am using VC++ )
...
This question is about vararg functions, and the last named parameter of them, before the ellipsis:
void f(Type paramN, ...) {
va_list ap;
va_start(ap, paramN);
va_end(ap);
}
I was reading in the C Standard, and found the following restriction for the va_start macro:
The parameter parmN is the identifier of the rightmost para...
Hi stackers!
What is the right way to create a pointer to pointer object? Like for example,
int **foo;
foo = new int[4][4];
Then the compiler gives me an error saying "cannot convert from int (*)[4] to int **.
Thanks.
...
What are the different registers used by the C++ compiler in a program? What is the difference between SP and FP? If possible please point me to some detailed reference docs. Curious to know the underlying things happening in a compiler. Is it possible to view these registers during the execution of a program in Visual Studio.
Appreciate...
I am looking for a property browser/editor for generic activeX controls.
It must work for controls that just expose an IDispatch interface, no proeprty pages of their own.
Best would be something that comes with the OS (like the "All properties" property page VC6 used). It is only for testing, so comfort is not important, modal propert...
I'm having trouble with some valarray function pointer code:
double (*fp)(double) = sin;
valarray<double> (*fp)(const valarray<double> &) = sin;
The first compiles, the second gives:
error: no matches converting function 'sin' to type 'class std::valarray<double> (*)(const class std::valarray<double>&)'
...
Hello, I've been instructed to download and install FlashDevelop and it seems fine but I don't know how to generate exe files when writing programs in haXe. I try to Build or Run the project in FlashDevelop BUT it just doesn't do anything. Can anybody please advise me on how to do this?
Thank you
...
I have a problem in calling a template class I have.
I declared a new type name Array, which is a template;
In the .hpp file:
template <typename T>
class Array
{
public:
Array();
};
In the .cpp file:
template <typename T>
Array<T>::Array()
{
//Do something
}
In main:
Array<int> arr;
I get Linkage error: unresolved external s...