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

Write to a Database Using SQL and ASP

n previous 10-Minute Solutions, I have covered how to retrieve data from a database and display it in the browser. The complement to that functionality is getting data from the

Compiling Machine Code with GCJ

pen Source Java development tools are finally on the rise and the GNU Compiler Collection (GCC) is helping to lead the charge. GCC was originally just a C compiler, but

Using Command Line Arguments

Editor’s Note: Code in this Solution has been updated since its original publication. ne of the virtually forgotten features of Visual Basic is the ability to accept command-line parameters when

Create a Link to the Previous Page Using ASP

With pages that are generated dynamically, you can’t provide a hardcoded link back to the previous page. However, ASP often provides you with the name of the page that contained

Drag HTML Code Fragments to VID’s Toolbox

The best way to avoid syntax errors and unnecessary typing is to store frequently used code in the Visual InterDev toolbox. It takes a few seconds and it saves hours

Add Full-Text Search of an Access Database to ASP Pages

Although SQL Server 7 is the more robust and scalable database for full-text searching, many developers still use Microsoft Access for less-demanding database applications. You can search an Access database

Create Line Breaks in the VID Label Object

The Visual InterDev label script object is a quick way to display text on your Web pages. Trouble is, the data from your recordset may contain line breaks that the

Returning a Value

Question: When executing a system call, how can I return a value back? My program will already return a value back. Example: String blah = system(“some command”); Is this correct?

All About Bool.h

Question: In my computer science class our teacher wants us to find information about Bool.h, which is supposedly in C++. No one in my class can find anything. Also, we

Array Initialization

Question: I’ve always used memset() in C to do char array initialization, but in C++ is it normal/acceptable practice to initialize a char array during declaration using this syntax? char

Circular Pointers

Question: I’m trying to make two classes point to one another. I know the syntax is weird, but it’s just to illustrate: class x{ y* ptry; }class y{ x* ptrx;

Array of Objects

Question: I have two questions. How do I pass an array of objects as an argument? How do I fix an error like “do or while loops are not expanded

Implicit Function Declaration

Question: I am a Computer Science student, and I am trying to compile a program where I use multiple files and my own header file for the first time. But

Eight-Byte Data Types

Question: I am looking for a data type in C++ that takes eight bytes. I have tried long, long int, and so forth, but they are all four bytes on

Debugging Macros

Question: In our project we are using many long macros. How we can debug them (setting breakpoints, etc.)? Is there any solution for that in Visual C++ 6.0? Answer: Unfortunately,

Exporting Templates Under C++

Question: How do I create a template library so that I can export templates and use them in different programs? Answer: I’m not sure I understand what you mean by

Memory Stack vs. Free Store

Question: When using C++, is it better to use stack or free store memory for data objects of medium to large size? I have multiplatform concerns on the answer. The

Initializing a Const Member

Question: I’m trying to initialize a const declared in a class. How do I do this? This example fails: class MyClass {private: const int A;}MyClass::MyClass () { A = 1;}

Templates and Nested Classes

Question: What is the C++ syntax for defining a function that belongs to a nested class that is contained within a template class? For example: template class A{ protected: //

Default String Class

Question: Is there a built-in or default string class in C++ or do I have to create my own? If so, what file can I look in to see the

STL and User-Defined Classes

Question: I’m new to the Standard Template Library. How do I incorporate a user-defined class into a hash_map? What functions do I need to overload? I get compiler errors when

Address of a Constructor

Question: How can I obtain the address of a constructor for a C++ class object? Answer: A constructor is not an ordinary member function. You cannot take its address.

Default Arguments to Functions

Question: Is it considered acceptable to use default argument initializers both in a definition of a function (e.g., void foo(int x =10) {…}) as well as its declaration? Stroustrup, in

Linking Two Databases in a SQL Query

Question: I have two databases, each on a separate machine in a network. I want to generate a report extracting data from table1 in database1 and table2 in database2. How

SQL Using Like to Search for

Question: I have created a database of journal articles and want to offer users the ability to search the Author field for the surnames of authors. Most of the articles

Can ADO Read and Write XML Files as Recordsets?

Question: Can the latest version of ADO (ActiveX Data Objects) read and write an XML file as a recordset? Answer: Ah, let me qualify that: ADO 2.1 can currently produce

Modify XML Using DCOM From the Cache

Question: How can I modify and update XML docs that are stored in the cache using a DCOM model (client side)? Answer: Given that caching is an IIS (Internet Information

Truncating the Last Five Characters in a Field

Question: How do I truncate the last five characters in a field? (The string length varies from row to row.) Answer: Try something along these lines: select left(myfield, datalength(myfield)-5)