The Latest

DevX - Software Development Resource

Indirectly working with a structure in C++

Question: I am trying to create a class that can be given the pointer to a structure. The class has other means to know what goes into the structure, but

DevX - Software Development Resource

Doubling Quotes in SQL Server

This routine parses a string and returns an equivalent string where all the instances of a given substring are doubled. This is especially useful for doubling quotes within SQL statements

DevX - Software Development Resource

Enhancing Vector’s Performance

Standard vector dynamically allocates the required amount of memory it needs; which saves you the bother of memory management. However, letting vector acquire additional memory slowly one chunk after another

DevX - Software Development Resource

Avoid name conflict by using namespaces

In large-scale software projects, short and elegant names for types and functions are problematic because they can cause a name conflict, i.e., the same name is used more than once

DevX - Software Development Resource

A Button Constructor for Java 1.1

With JDK 1.1, you can define an action command String for a Button that is independent of the text displayed in the Button. At the least, this enables you to

DevX - Software Development Resource

Free System Resources

Question: Is there an API call to find the amount of free system resources in Windows 95? Answer: Good news and bad news, here. Yes, there is. But, no, you

DevX - Software Development Resource

Double quotes in queries

Question: OK, suppose you need to include in a query a string which contains both single and double quotes, for example:UPDATE Books SET Title = “Gulliver’s Travels”I need to save

DevX - Software Development Resource

Compilers for Windows CE

Question: I’m developing a project that will use H/PCs. But which compilers are available for Windows CE? Answer: Currently, Microsoft is the only vendor offering a compiler for Windows CE.

DevX - Software Development Resource

Enumerating Function Parameters

Question: I’m writing on an OCX Control with VB5. I have a lot of functions in it and I dont want to scare the end user with a lot of

DevX - Software Development Resource

Control in what Container?

Question: Is there a way to find out if a control that I am writing in VB5 is inside a container such as a picture box and then find out

DevX - Software Development Resource

Member or Global Function?

Question: I have a function that takes 2 classes as arguments. Should I make the function global or inside the class? If that should be a member function, is there

DevX - Software Development Resource

Casting

Question: Hi,got a problem with a cast. Maybe someone out there knows how to solve it. How can I get this void pointer to act like (point to) my object?example:

DevX - Software Development Resource

Reading a data file in C++

Question: I’m trying to read a data file that I can read just find in Visual Basic, but the integers don’t seem to work when I use Visual C++. Note:

DevX - Software Development Resource

Formatting Text

Question: I am doing a word processing programs which perform a task called center justification on one paragraph user enters–similar with the center justification function performed by MS-Word.I have to

DevX - Software Development Resource

C++ Linked list

Question: How would you reverse a linked list? Have looked in books at school library, and in tutorial. Hope you can point me in the right direction. Thank you for

DevX - Software Development Resource

Adding/Subtracting Time

Question: How do I add/subtract a series of time values of format hh:mm:ss (for example, 02:45:32 + 00:35:43 + and so on)? Also, how do I set the mm:ss format?

DevX - Software Development Resource

System Tray

Question: Can you program C++ to allow a program run in the system tray (next to the clock) like VB? If so, is there sample code somewhere? Answer: This task

DevX - Software Development Resource

Queues & Stacks

Question: Though I’ve been programming in C/C++ for several years now, I’ve never understood how to build a queue or stack. I used to resort to some of the included

DevX - Software Development Resource

Pointers’ content reset

Question: I’ve declared a pointer to integer in file A of project. The pointer is also being used by file B of the same project. I discovered that the pointer’s

DevX - Software Development Resource

OnPaint Flickering

Question: I am a high school student using MS VC++ version 5.0 for my school science project. I am loading bitmaps with the StretchBlt function in the OnPaint function to

DevX - Software Development Resource

Adding a help file to an executable

Question: A quick question that should be a quick one for an experienced PB guru. How do you attach/add a help file that was created in Winhelp or any other

DevX - Software Development Resource

16 table limitation for a datawindow select stmt

Question: Is there a work around the SQL server 16 table limitation? Maybe temporary tables, Access, or even denormalization of the database tables? The database is large and very complex

DevX - Software Development Resource

Toggling Edit Control Word Wrap

Question: I have an OWL application in C++. I need to be able to switch in run-time between wordwrap and no-wordwrap text in the Editor window. How can I do

DevX - Software Development Resource

System calls for Clearing Screen

Question: Right now i’m still learning Visual C++, version 4.0. It may seem like the easiest thing in batch or Basic languages, but I can’t figure out how to clear

DevX - Software Development Resource

Parallel port prgoramming

Question: How can I access the parallel port to control a car which can move in any direciton.I want to control each pin seperately. If you have any tutorial or

DevX - Software Development Resource

Exceptions and operator new

Standard C++ states that operator new should throw an exception of type std::bad_alloc when it fails. This is different from previous stages of C++ and it means two important things:

DevX - Software Development Resource

Exception specification

A function that may throw an exception can warn its users about that by specifying a list of exceptions it may throw, thus helping its users to catch such exceptions

DevX - Software Development Resource

Operator overloading rules of thumb

When overloading an operator to support a user-defined type (object), it is best to adhere to the basic semantics of that built-in operator. For instance, the built-in operator ==, which

DevX - Software Development Resource

Advantages of bool type

Standard C++ supports a built-in Boolean type: Bool. Variables of this type are can be assigned either a true or false values exclusively ( true and false are now reserved