First  |  Prev |  Next  |  Last
Pages: 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74
typedef vs inheritance
I found in C++ a type is typedef several times and alot of time, I need to dig further to see the original type. like LPDWORD - it's a strange type, but when i dig further, i see it's a (DWORD *) =========== typedef DWORD near *PDWORD; typedef DWORD far *LPDWORD; =========== i feel tha... 18 Apr 2008 12:36
return value
Is there any way to return either NULL or a SYSTEMTIME object? will it work in C++? as in Java, one can return either NULL or an object, does C++ has something similar? Is the following code OK for C++? ================= SYSTEMTIME Table::Get(char* FieldName) { _variant_t vtValue; vtValue = m_Rec->Fi... 17 Apr 2008 10:55
MFC - _beginthreadex
why if I have used MFC in my EXE - then I cannot use _beginthread / _beginthreadex? to create a thread? I seem to hear someone said so earlier... ... 17 Apr 2008 10:06
return string
I have a function like this ============= bool Table::Get(char* FieldName, char* FieldValue) and I call the function like the follow ============= while(!tbl.ISEOF()) { char id2[300]; if(tbl.Get("program",id2)) cout<<"program:"<<id2<<endl; else { tbl.GetErrorErrStr(ErrStr); cout<<"\n"<<ErrStr<<... 18 Apr 2008 02:01
Is conversion from T* to void*& safe?
Hello! Is the following use of reinterpret_cast safe: void f(void*& p); void g(int* p) { f(reinterpret_cast<void*&>(p)); } If my memory serves me right, the standard says that the convertion from T* to void* and back to T* should yield the same pointer value, but I do not remember anything about ref... 16 Apr 2008 18:02
How should I access _MAX__TIME64_T?
Due to a CRT bug, if you pass a value into localtime_s() greater than _MAX__TIME64_T, the program will crash: http://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=266036 So, I want to range check my data. But _MAX__TIME64_T is not #defined via #include <ctime>. I have found it only in... 16 Apr 2008 17:13
Inadequate error message C2228
Compiling the code #include "stdafx.h" #include <iostream> class A {}; class B { public: B() { std::cout << "Inside B()" << std::endl; b = 0; } B( const A & ) { std::cout << "Inside B( const A & )" << std::endl; b = 1; } B( const B & ) { std::cout << "Inside B( const B & )" << s... 17 Apr 2008 08:31
sizeof() struct w/ nested enum returns wrong size
I have the following situation compiling using Visual Studio 2003: #include "stdafx.h" #include <iostream> #include <limits> namespace Outer{ class Xyz { public: typedef struct { enum { classConstant1 = 0x0001, classConstant2 = 0x00... 16 Apr 2008 12:23
replacing sprintf_s in macro for compiler compatibility
Hello, I will have to build my application with a different compiler at some point. The secure functions like sprintf_s are a nice feature of the visual c++ compiler. But they will probably not be supported on the target platform. If I had the possibility to #define a macro which uses sprintf_s if the visual ... 17 Apr 2008 02:46
Prologue/Epilogue for SEH
I wonder if anyone here might know a bit more about structured exception handling (SEH) with VC++ than the Microsoft documentation provides. When the SEH function prologue is: push regs allocate stack space the required epilogue form is: add rsp, stack_space_amount pop regs ret... 16 Apr 2008 09:59
First  |  Prev |  Next  |  Last
Pages: 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74