devxlogo

Tip Bank

Address of a Constructor

Question: How can I obtain the address of a constructor for a C++ class object? Answer: A constructor is not an ordinary member function. You cannot take its address.

STL and User-Defined Classes

Question: I’m new to the Standard Template Library. How do I incorporate a user-defined class into a hash_map? What functions do I need to overload? I get compiler errors when

Default String Class

Question: Is there a built-in or default string class in C++ or do I have to create my own? If so, what file can I look in to see the

Initializing a Const Member

Question: I’m trying to initialize a const declared in a class. How do I do this? This example fails: class MyClass {private: const int A;}MyClass::MyClass () { A = 1;}

Linking Two Databases in a SQL Query

Question: I have two databases, each on a separate machine in a network. I want to generate a report extracting data from table1 in database1 and table2 in database2. How

Values Resulting to Null

Question: I want to add two numeric fields with values like these: Example 1: One field named Amount contains 565.25 and other field named Ticket contains null. select amount +

Select Statement Not Working

Question: I am trying to code an event that will transfer information from the current form into the display of another form. Information like company name and address, and contact

T-SQL Data Conversion

Question: I want to convert a signed integer into a 16-bit binary as part of a SELECT statement. For example: select myint, howeveritsdone as Binaryfrom mytablemyint Binary—- —————–137 1111111101110111-100 1111111110011100