August 1, 2001

Form-Building Routines III—the Conclusion

f you’ve been following this series, the last couple of articles (see Resources) focused on writing some useful “form-building” routines in ASP pages. I’ll continue this month by developing routines

Not Much to ‘C’ in C#

# is getting a lot of attention these days?so much attention that some DevX readers have begun to remonstrate on what they consider excessive coverage, especially for a language that

A Null Preprocessor Directive

An empty # sign is a null preprocessor directive. A null directive has no effect but you can use it to document your intentions, for example: ifndef HEADER_INCLUDED#define HEADER_INCLUDED#else# //

Wide-char File Streams

The library supports two types of file streams: char-based streams such as std::ifstream and whcar_t streams. The names of wchar_t streams are the same as their char-based counterparts, except that

Repositioning a std::fstream Pointer

Just like the fseek() function of , classes enable you to position the stream’s pointer at an arbitrary location by calling the seekg() member function. For example, you can position

char[] vs. char *

C++ forbids direct assignments of arrays. Therefore, your compiler will flag the following code as an error: char buff[];buff=

Optimizing the Use of std::string

Here a few guidelines for improving std::string’s performance and avoiding common pitfalls. Consider the following for-loop: std::string str =

Pointers and Arrays

C++ never passes arrays to a function. Instead, the argument is implicitly converted to a pointer that contains the address of the first array element. For example: void f(char s[]);int