Tip Bank

DevX - Software Development Resource

Returning a Value

Question: When executing a system call, how can I return a value back? My program will already return a value back. Example: String blah = system(“some command”); Is this correct?

DevX - Software Development Resource

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.

DevX - Software Development Resource

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

DevX - Software Development Resource

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

DevX - Software Development Resource

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;}

DevX - Software Development Resource

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

DevX - Software Development Resource

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 +

DevX - Software Development Resource

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