First  |  Prev |  Next  |  Last
Pages: 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122
auto_ptr in exception safety design
Hello everyone, What I am confused is about, http://www.gotw.ca/gotw/059.htm -------------------- Indeed, often the best way to implement the Pimpl idiom is exactly as shown in Example 4 above, by using a pointer (in order to take advantage of nonthrowing operations) while still wrapping the dynamic res... 30 Mar 2008 09:07
replace string file
I have a function that will take char buffer and dump all data into a file. How can I replace all <givenname xsi:nil='true'/> with <givenname>.</givenname> ============================= int my_block_reader(void *userdata, const char *buf, size_t len) { char *szBuffer = new char[len + 1]; memcpy... 29 Mar 2008 05:38
Return values from functions
I know that one should not return a pointer to a function variable that is on the stack. But is there any problem doing so with a static function variable? Thanks, gtb ... 30 Mar 2008 21:35
COM MTA model
I did little development of COM components, and for those I used STA model, because I think it is easier to develop COM code in STA than in MTA (e.g. in STA COM takes care of the details, like COM objects syncrhonization, etc.) I'm curious about MTA model: have you ever written COM components using MTA model? ... 28 Mar 2008 19:52
Swap function of STL container
Hello everyone, All swap functions in STL container class is exception safe and nothrow, right? I have searched for swap for vector and deque, but seems no explicit document about the exception safe level. thanks in advance, George ... 28 Mar 2008 10:02
derived class
Hello everyone, What does the following statement about derived class mean? http://www.gotw.ca/gotw/059.htm -------------------- Unreasonable Statement #1: "Polymorphism doesn't work in C++ because you can't make an arbitrary class usable in place of a Base& without changing it (to derive from Base)." ... 31 Mar 2008 04:39
Unable to remove hooked DLL
Hi, I have a dll which can install a global hook. There are two functions: InstallHook() and UninstallHook(). With InstallHook() the caller can install the hook. With UninstallHook() the caller can unhook the DLL. I want to delete the dll after calling UninstallHook(). But sometimes the dll can't be deleted... 27 Mar 2008 22:27
_variant_t
Why I got error for following code: vtValue == VT_NULL 1>d:\trash4\database\database.cpp(156) : error C2593: 'operator ==' is ambiguous ====================== bool Table::Get(char* FieldName,int& FieldValue){ _variant_t vtValue; vtValue = m_Rec->Fields->GetItem(FieldName)->GetValue(); if (vtValue == VT_N... 27 Mar 2008 17:00
ADO getting DATETIME type
I tried to get the DATETIME data type from SQL Server using ADO in VC++. The DATETIME value shown in SQLServer is 3/20/2008 2:00:00 AM But when I look at the vtValue object in VC++ debugger it looks something like: tagVARIANT DATE = 39527.083333333336 vt 7 unsigned short DATE 39527.083333333336 dou... 27 Mar 2008 18:06
import vs include
So the difference between import and include is that: import = used for binary library like DLL or .Lib files. it's very similar to include that it load all the header (function definition) from the DLL file so that we can use the header file just like include include = just include header (source file) ====... 28 Mar 2008 02:15
First  |  Prev |  Next  |  Last
Pages: 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122