|
class returning member function Hi, In the following code snippet, if I comment out line b, the output becomes: constructor constructor whereas if I comment out line c, the output becomes: constructor copy constructor Any explanations regarding what is causing this difference is appreciated. #include <iostream> using namespac... 28 Dec 2007 14:05
Comparing a Vector with Another Vector or a Single Value Consider a function that compares a vector of doubles, for instance, with either another vector of equal length or just a single double. The type of comparison is not known until runtime. The output will be a vector of bools. Case 1: For each element in vectorA, if vectorA[x] is greater than vectorB[x], output[x... 1 Jan 2008 12:26
Legality Of Superfluous Keywords In Declarations Hi All, While musing about the probability that rabbit might have been served more often than turkey during the holidays of years long past, I accidentally typed the following declaration into Visual Studio 2005 and hit the compile key. unsigned int long int POLYID; It compiles without error. So I tried.... 7 Jan 2008 11:10
searching for a value in std::map Hi, I have a map<int,unsigned int>. At a certain point in my program, I know a value that is stored in the map and I need to find the key. I thought I remembered seeing a member function in std::map that did that. Is there? Or am I thinking of a different container class? Thanks, Jim -- [ See http:... 28 Dec 2007 10:37
enum v.s. static function in template class: which one is better ? "Lizax" <lizax(a)126.com> writes: I want to implement a template like this: template<typename T, int id> struct Foo { typedef T Type; enum { value = id }; }; or template<typename T, int id> struct Foo { typedef T Type; static int value() { return id; } }; ... 26 Dec 2007 15:15
enum v.s. static function in template class: which one is better ? Lizax wrote: I want to implement a template like this: template<typename T, int id> struct Foo { typedef T Type; enum { value = id }; }; or template<typename T, int id> struct Foo { typedef T Type; static int value() { return id; } }; which one is bet... 27 Dec 2007 05:19
enum v.s. static function in template class: which one is better ? On 26 Dec, 01:42, "Lizax" <li...(a)126.com> wrote: I want to implement a template like this: template<typename T, int id> struct Foo { typedef T Type; enum { value = id }; }; or template<typename T, int id> struct Foo { typedef T Type; static int value() { return... 26 Dec 2007 15:49
enum v.s. static function in template class: which one is better ? I want to implement a template like this: template<typename T, int id> struct Foo { typedef T Type; enum { value = id }; }; or template<typename T, int id> struct Foo { typedef T Type; static int value() { return id; } }; which one is better ? Thanks. -- [ See http://www.g... 26 Dec 2007 15:49
When will there by official support for ODBC in C++? On 19 Dec, 06:48, Lance Diduck <lancedid...(a)nyc.rr.com> wrote: When will ODBC support be an official part of C++? ODBC is already a standard. ISO 9075 part 3. It sounds like you just want the C++ committee to say "ISO 9075 SQL-CLI is the official way to program C++ and relational dbs." That is basicall... 7 Jan 2008 11:10
dynamically loading classes at runtime - will it ever be official? On 19 Dec, 06:48, Alex <ale...(a)gmail.com> wrote: So I wonder what the chances are of it ever becoming part of std C++? This seems like a long shot I know, I have never heard this sort of thing being mentioned before in the discussions about the future of C++. http://www.open-std.org/jtc1/sc22/... 23 Dec 2007 15:45 |