devxlogo

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

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

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

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:

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:

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

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

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?

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

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

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

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

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

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

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

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

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

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:

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

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

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

Struct assignment

Both standard C and Standard C++ support struct assignment using = . In fact, C++ programmers are often surprised to discover that assignment operator applies also to plain structs, and

Object I/O

Question: How can i add many java objects to a file then retrieve them as Java objects from the file? Answer: Java 1.1 introduced a concept called serialization. Serialization isa

Constant pointers

There are cases when you need to define a constant pointer to a variable/object; for instance, when taking a function address, or when you want to protect a pointer from

Namespaces are open

Unlike structs, classes, enums, and unions, the enclosing brace of a namespace definition does not prohibit you from further extensions to that namespace. A namespace can be extended this way:

Garbage Collection

Question: Is it possible to preserve an object from garbagecollection (to live as long as the applet)? Answer: Yes, it is possible to preserve an object from garbage collection andlive

Unix Signal Handling

Question: Is there a way in Java to handle Unix signals(i.e. to trap a Control C signal)? Answer: You can handle Unix signals only by writing native code. However, theJava

byte array to int conversion

Question: I have just read a packet of data into a byte array from a socket. At offsets 5-8, 9-12, and 13-16 are binary integers. How can I get them

Invocation of methods of a dynamically loaded clas

Question: I have two classes in two separate files. I don’t want to use an interfacebecause the types of objects I’ll instantiate dynamically can be quitedifferent each time. What can

Java OOP

Question: What exactly is a Factory or Factory class? Answer: A Factory is a class that you use to create sets of related objects withoutexplicitly invoking their constructors. You usually