Tip Bank

DevX - Software Development Resource

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 - Software Development Resource

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 - Software Development Resource

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 - Software Development Resource

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 - Software Development Resource

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