|
header files in VC
|
| |
Hello everyone, If we do not include any header files in VC, for example in a console application from an empty project, will VC automatically include some header files for us? My confusion is from the size_t discussion, in the discussion we could use size_t without include any files, but in MSDN it is mentioned size_t is... more »
|
|
msvcp90d.dll and msvcr90d.dll
|
| |
Hello everyone, I find when a C++ console process loads, the DLLs msvcp90d.dll and msvcr90d.dll are always loaded. My question I want to find the different functions of the DLLs and why CRT runtime provides two DLLs other than one. I have not find any formal information from search. I just did some self... more »
|
|
How to typedef a memeber function type?
|
| |
class CCvdVolume { public: typedef NTSTATUS (*QC_M_FUNC)(PIRP Irp); QC_M_FUNC f_Create; NTSTATUS Create(PIRP Irp) { return 0; } void _Init() { f_Create = Create; } ...compile error: cvdvolume.h(13) : error C2440: '=' : cannot convert from 'NTSTATUS (__thiscall CCvdVolume::* )(PIRP)' to 'CCvdVolume::QC_M_FUNC'... more »
|
|
VC++ Express edition question!
|
| |
Hello, As I did in my previous post, (with difficulty) I was able to create a pure .c file to test some C code in an older VC++ compiler version. Now I am trying to do the same thing with VC++ 2008 Express edition. I don't know why I have such difficulty with doing C in VC++, there is just too much... more »
|
|
Strange pimpl problem - const correctness not respected by compiler
|
| |
(I accidentally posted a first version to m.p.dotnet.languages.vc) Hello! I have a strange problem with my pimpl implementation. What happens is that const correctness is not respected by the compiler. Among two methods, one const and one non-const, the non-const version ends up being called on a const... more »
|
|
convert wstring to wchar*
|
| |
To convert std::wstring to wchar* or LPWSTR the function is wstring.c-str() which returns wchar* This works fine in VC6 But in visual studio 2008(vc9) it returns garbage value. is there some other function to convert std::wstring to wchar*/LPWSTR
|
|
Recursive variadic macro
|
| |
Hi, I want to create recursive variadic macro UNREFERENCED_PARAMETERS. I want to use it this way: int fn(int a, int b, int c) { UNREFERENCED_PARAMETERS(a,b,c) ; return 0; ...Is it possible to do in c++? I thing that here is problem with expansion when just 1 parameter remain. How to solve this problem?... more »
|
|
SetTextCharacterExtra
|
| |
//Why does DrawText sometimes overlap characters //Thank you, //Tim pDC->SetMapMode(MM_HIMETRIC); pDC->SetTextCharacterExtra(85) ; CFont* def_font = pDC->SelectObject(&font); CRect r; CString strName="1884-1922"; //does not print '-' r.SetRect(200,-2000,8000,-3000 ); pDC->DrawText(strName,r,DT_CEN TER);... more »
|
|
Any way to verify static array size at compile time?
|
| |
Hi, Assuming that I have a static array initialized as follows: int a[] = {1, 2, 3, 4}; Is there any way to verify its size at compile time? That is, I'm looking for a syntax that is similar to the following that I can do at runtime: ASSERT(_countof(a) == 4); Ideally, I'd like to be able to do something similar to what the following... more »
|
|
|