The Latest

DevX

What’s the C++ Equivalent to _getch()?

Question: What is the C++ equivalent to _getch()? I need to have program control immediately after any keypress in a DOS-based program. Answer: Unfortunately there is no specification in the

DevX

How to turn text string into Integer

Question: How can I turn a text string into an integer? Answer: You can convert a string to an integer by using the atoi function. For example:void foo (){int i

DevX

String handling in C++

Question: What is the best way to manipulate strings in C++? Answer: Here is an example.#include void foo (char *instring){ // Declare char array big enough to read in input

DevX

How to do large scalar math

Question: How can one do 64-bit or larger math calculations in C++? Do you know of a free class or class library that supports large scalar math? Answer: There are

DevX

Copy constructors

Question: I have a class with multiple parents. In my copy constructor, should I invoke the parents’ copy constructor or their default constructor? Answer: In all but the rarest of

DevX

Program compiles but does not show age data

Question: I’m anxious to know why my program is notdisplaying the data, yet it compiles perfectly.I want to read this struct; in particular: age. Ihave two sets of code that

DevX

Virtual Functons

Question: How are Virtual Functions implemented in C++ ? What is a virtual table? Answer: Let me start by saying that the C++ language definition does not impose any implementation

DevX

How to view an image

Question: An old high school friend said he put a picture of himself on the Web, and to view it I should go to JPEG … WHAT DO I DO???

DevX

Screen resolution detection

Question: I need to know how to detect the screen resolution of the client machine. Then I need to tell it to go to specific pages based on what it

DevX

Hyperlinks opening a new browser

Question: I’m working on a Web site in Microsoft Front Page, and when I browse the home page in either Netscape of Internet Explorer, all the hyperlinks on the page

DevX

Calculating Averages Within Arbitrary Groups

Question: [Joe Celko’s Production Report Puzzle]We get a production report from work centers which has a date, center code and how many widgets were produced from each batch of raw

DevX

Nested Outer Joins

Question: [Joe Celko’s Outer (JOIN) Limits Puzzle]Gerard Manko at ARI had a problem in 1994 April. They had just switched over from Paradox to Watcom SQL. The conversion of the

DevX

What does AFX stand for?

Question: I see the term “AFX” everywhere in the MFC source code.For example, “AFX_MSG_MAP”. What does it mean? Answer: I once asked this of Jeff Harbers, one of the original

DevX

ODBC Versus SQL

Question: What are the disadvantages of ODBC versus SQL? Answer: ODBC is a generic implementation, whereas native SQL is always optimized for the database server being used. Thus, if you

DevX

Calculating and Using Averages

Question: Can I determine which employees have received a salary for a month that is more than twice the average salary in that month? I need to show:month_number, average salary,

DevX

Indexes in SQL

Question: Is it possible to set indexes between tables in SQL expression? Answer: You can establish indexes on SQL tables, but SQL indexes do not create an implied relationship between