We are an award-winning tech entrepreneurship website where trusted experts can provide value globally.

Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.

devxlogo

Trusted for 26 years

Over 30K Articles

1M+ Readers

Expert-reviewed

10K+ Tech Terms

As seen in:

microsoft logo
business_insider_logo
wired_logo
berkley
arstechnica_logo
hackernoon

The Latest

DevX - Software Development Resource

C++ equivilant of Basic MID$

Question: I need to test for a certain char in a char array.For example, in BASIC I would have: if mid$(string,1,1) = “`” then blah blah blah…. How would I

DevX - Software Development Resource

Sorting in a ListView

Question: I would like to know how to program a Custom Sort procedure on a ListView in Borland’s C++ Builder. Answer: Normally, the ListView control will sort items automatically for

DevX - Software Development Resource

Return type _Cdecl

Question: I have seen that in many of the header files in C++ the return type is _Cdecl. For example, in complex.h, we have the following: friend complex _Cdecl acos(complex&)

DevX - Software Development Resource

Quick sort

Question: I have pseudocode for a quick sort. I know how to implement it in Pascal. Is there simple code for quick sort in C++? How can I find other

DevX - Software Development Resource

External file execution

Question: How can I code a Visual C++ program that will execute a DOS bat file? Or any other executable file, for that matter? Answer: Use the system() function. This

DevX - Software Development Resource

Functions and parameters

Question: I know this may sound like a dorky question, but can you explain to me?as if I were a little kid?what are functions, and why and how are parameters

DevX - Software Development Resource

Pointers to member functions

Question: I am having lots of trouble calling a class member function pointer that is declared within the same class. So far the following compiles: class testClass {public: void (testClass::*ptr)();

DevX - Software Development Resource

Integer lengths

Question: What function gives the actual length of an integer or long integer? For instance, 8 is 1 long, 12345 is 5 long, etc. Answer: Use the sizeof() operator to

DevX - Software Development Resource

Performance—C vs C++

Question: What are the performance tradeoffs of using C++ instead of C? Are there any ways of overcoming these tradeoffs? Answer: In general, C++ is every bit as efficient as

DevX - Software Development Resource

Adding to the front of an array

Question: I have to read in integers and be able to add them to the front of the array. How do I do this? Answer: You can either use the

DevX - Software Development Resource

Windows programming

Question: We use NT 4 WS as the client to our PeopleSoft (Oracle) application, and we need to pick off the information contained on the panel fields. We can easily

DevX - Software Development Resource

Rebooting NT from VB

Question: How do I reboot (with an option to force) inside of Win NT? I know about the ExitWindowsEx API call, which works fine in Windows 95, but unfortunately this

DevX - Software Development Resource

File version information under NT

Question: I am using the GetFileVersionInfoSize, GetFileVersionInfo, and VerQueryValue APIs to get the file version of third-party applications. In all cases, GetFileVersionInfoSize returns a large number, but when I query

DevX - Software Development Resource

Output to I/O port under NT 4.0

Question: Please kindly advise how to output to a PC’s I/O port address: &H158 using Visual C++ under NT 40. For your information, we used to use outp() using C

DevX - Software Development Resource

FTP

Question: If I ftp to an AS400, I can run a program on it by typing quote rcmd call . Is it possible for me to do the same thing

DevX - Software Development Resource

Automatic logon problems in NT 3.51

Question: We are running a SCADA package on an NT 3.51 machine at a mine. Since we often have power failures, the PC reboots itself and then requires the operator

DevX - Software Development Resource

Scheduling A Visual Basic app on NT

Question: I have a VB app that was running on Windows 95 and using the scheduler included with Microsoft Plus. All was well. Now our company is switching to an

DevX - Software Development Resource

Use Register variables to enhance performance

The C/C++ register keyword can be used as a hint to the compiler that the declared variable is to be accessed very often during program execution, and hence, should be

DevX - Software Development Resource

Static member function

A static member function in a class can access only other static members of a class or variables which are not members of its class. It can be invoked even

DevX - Software Development Resource

Retrieving actual object type in run-time

C++ supports Run-time Type Identification (RTTI), which enables detection of actual object type during program execution using the built-in typeid() operator. Here is an example: //file: classes.hclass base{ base(); virtual

DevX - Software Development Resource

Global objects construction and destruction

In object-oriented programming (OOP), global objects are considered harmful. Particularly in C++, there’s even more reason to think twice before using them: a global object construction occurs before a program’s

DevX - Software Development Resource

When is a mem-initializer required?

A const member or a reference member cannot be initialized within an object’s constructor. Instead, they must be initialized in the constructor’s member-initializer list. Conceptually, mem-initialization takes place before the

DevX - Software Development Resource

Uses of an anonymous union

Unions are used to minimize memory waste. For example, consider the following database-transaction class used to update a person’s data. The key can be either a unique ID number or

DevX - Software Development Resource

Datawindow print dialog

Question: How can I get the Windows 95 print dialog box todisplay instead of the print setup dialog usingprintsetup()? Answer: You have to build your own custom dialog window. The

DevX - Software Development Resource

Text files with MFC

Question: I have been reading Visual C++ 5 in 21 Days while trying to learn how to use the Visual C++ user interface, and I have been trying to find

DevX - Software Development Resource

System commands

Question: Is there a way for me to issue system commands (for example, DOS commands: dir, md temp, etc.) from within a C++ program? Answer: You can use the C