Columns


C/C++Sources

Victor R. Volkman

Best of Reader Requests: You Asked for It!

Now, more than ever, you need a native guide to explore the Internet with safety and certainty.


Helping people find the libraries and tools they need on the Internet continues to turn up interesting resources. Yes, its true that the enormous growth of the WWW has made searching ever more difficult (mainly due to the increasing number of "noise" hits). However, the increase in quantity and quality of programming resources I've seen in the last two years makes it even more worthwhile. Increasingly, you'll find me recommending books where subject matter dictates a more exhaustive approach than most websites provide.

Of course, I've replied to each request by email prior to publication. But if you've got a better link or tool to offer than what I've come up with, then send on a brief email to those readers. At this point, reader requests are coming in so fast that what you'll see printed here represents one-third or less of the total volume. Read on; odds are you'll find something you've been looking for or maybe gave up looking for. Send your reader requests to sysop@HAL9K.com.

Corrections and Updates

In the September 1996 issue of CUJ, I cited a source for the "Free C/C++ Sources for Numerical Computation Page" by Ajay Shah. Since then, I have had trouble using that link and have found a better presentation of Shah's same list by J.E. Hetrick at University of Arizona (Tucson)

http://soliton.physics.arizona.edu/~hetrick/c-sources.html

In the past, I've frequently mentioned the server oak.oakland.edu for SIMTEL-20 archives. Unfortunately, they have now discontinued mirroring service for SIMTEL-20. Please go directly to www.simtel.net/simtel.net/ for any sites mentioned in previous issues.

root@oasis.ot.com writes:

I always enjoy your columns in the C/C++ Users Journal, especially your columns on software sources. I have a comment on the March 1997 column.

It is my understanding that the APACHE web server is a product of the APACHE group (www.apache.org) and is released under the terms of the GNU public license but is not a product of the Free Software Foundation.

Keep up the good work.

In the March 1997 issue, I advised an experienced FORTRAN programmer on how to learn C++. I've since been corrected:

Carsten Arnholm, <CA@dnv.com> writes:

I saw your questions in CUJ about converting yourself from FORTRAN to C++. I am a long-time (10+ years) FORTRAN 77 programmer who has now converted entirely to C++. Having such a background, I think I can say that you got the wrong answers.

Question 1: What would be the best way for a FORTRAN programmer to learn C++?

Answer: Do not attempt to learn C++ by learning C first. C++ and C should be considered separate languages. You are likely to end up as a C programmer if you attempt this approach. Instead, I would recommend you follow Bjarne Stroustrup's advice:

a. Initially, use C++ as a "better C." C++ used that way is actually simpler than C! You can take advantage of features like passing function parameters by reference, much like you already do in FORTRAN. There is a wealth of other things in C++ which will relieve you from some of the syntactic difficulties in C, that seem extremely odd for FORTRAN programmers.

b. Read some books and attend a C++ course (not a C course!). I would recommend the following literature:

Question 2: Is there a side-by-side comparison (maybe on the Internet somewhere?) between the languages such as...

Answer: It's not quite that simple. A better idea is to learn the language as described above, and then you will realize the differences and similiarities. However, I have worked out a document which describes C++/FORTRAN 77 cross-language programming. I am sure you will find answers to some of your questions there. Good Luck in becoming a C++ programmer!

Victor writes:

You can email Carsten for a copy of the document or wait for its scheduled appearance in the December 1997 CUG CD-ROM. On a related note, I've had queries about Pascal and C++:

ravigsc@pobox.com writes:

I am a Pascal programmer moving to C++.

Victor writes:

There are plenty of texts available on this subject:

C++ for Pascal Programmers, 2nd Ed., by Ira Pohl, Addison-Wesley, November 1994, ISBN: 0805331581.

Mastering C++ : An Introduction to C++ and Object-Oriented Programming for C and Pascal Programmers, 2nd Ed., by Cay S. Horstmann, John Wiley & Sons, May 1996, ISBN: 0471104272.

Migrating from Pascal to C++ (Undergraduate Texts in Computer Science), by Susan M. Merritt and Allen Stix, December 1996, ISBN: 0387947302.

All available at http://www.amazon.com.

ekpub@ix.netcom.com writes:

[I would like to see] A Pascal to C/C++ conversion tool/program

Victor writes:

Try ftp://csvax.cs.caltech.edu/pub/p2c-1.20.tar.Z

New Reader Requests

Sukun Xie, <xiesk@hotmail.com> writes:

I am developing a program on serial modem communication in Windows. It deals with carrier detect, file transfer, CRC check etc., like terminal emulation in Accessory of Windows 3.1. Would you please tell me where I can obtain some source codes of the similar functions? You are very appreciated if you can give me some information.

Victor writes:

My highest reccommendation goes to Personal Comm Library for Windows (PCL4W), a shareware package by Marshallsoft Computing Inc. PCL4W provides DLLs to simplify writing your own terminal programs for Win 3.1 and Win32. Specifically, PCL4W provides interrupt-driven receiving and transmitting, advanced hardware support for the 16550 UART, DigiBoard, and BocaBoard, from 1 to 16 COM ports, RTS/CTS flow control, reliable performance to 115,200 baud, trapping on 19 different communication errors, and more than 30 API functions tieing it together.

MarshallSoft additionally offers call-level compatible libraries for MS-DOS, VB, and Delphi applications.

http://www.marshallsoft.com
ftp://ftp.marshallsoft.com/marshallsoft/mswin/pcl4w13.zip
ftp://ftp.marshallsoft.com/marshallsoft/mswin/wterm13.zip

More great libraries (including this one) can be found in my book Windows Programming with Shareware Tools, http://www.HAL9K.com/book.

For a somewhat aged (circa 1991) example, a very small terminal program with C source written by Microsoft is available:

http://www.chips.navy.mil/oasys/c/tty.zip

If you prefer a book, try:

Serial Communications: A C++ Developer's Guide, by Mark Nelson (662 pp.), M & T Books, 1992, ISBN: 1558512810.

es@noos.kiev.ua writes:

[Here is some] more information about existence of OS/2 as development platform.

There are a large number of OS/2 developers who are quite active on the Internet. There are many newsgroups in comp.os.os2 in which you can get your questions answered.

Victor writes:

The best OS/2 website is the EDM/2 (the Electronic Developer's Magazine for OS/2) at

http://www.edm2.com/

Timur Tabi maintains the most authoritative list of developers' resources about OS/2. You'll find links to compilers, GUI toolkits, device drivers, many programming tips, and much more.

http://www.edm2.com/common/links.html

payman@ctools.pp.se writes:

[I would like to see sources for] mainly Optical Character Recognition for now.

Victor writes:

Your best bet is the Document Understanding and Character Recognition WWW server. See the sections marked "Contributed Source Code" and "Public Domain OCR Resources." You'll see lots of source code there!

http://documents.cfar.umd.edu/

mverwerf@sckcen.be, Marc Verwerft writes:

I am writing a thesis on Monte Carlo simulations. It handles electron trajectory simulations in different specimens. More specifically, when there is a precipitate involved. At this moment the simulation is almost finished, but now I have to visualize it. It is therefore that I have contacted you. On the Internet I found that you are working on graphical libraries that can be used by C++ compilers. I'm searching for a usable library for my graphic models.

Victor writes:

I recommend looking into PLOTMTV, Gnuplot, and ISVAS. PLOTMTV's capabilities include 2-D line and scatter plots (x vs. y), contour plots, 3-D surface, line, and scatter plots, as well as vector plots. The program has a rough but functional GUI through which it is possible to zoom in, zoom out, pan, toggle between 2-D and 3-D plots, and rotate 3-D plots. Both color and grayscale Postscript output are supported.

ftp://aixpdslib.seas.ucla.edu/mnt/fs01/Plotmtv/RISC/4.1/src/Plotmtv.1.4.0.tar.Z. 

Gnuplot handles both curves (2-D) and surfaces (3-D). Surfaces can be plotted as a mesh fitting the specified function, floating in the 3-D coordinate space, or as a contour plot on the x-y plane. For 2-D plots, there are also many plot styles, including lines, points, lines with points, error bars, and impulses (crude bar graphs). Graphs may be labeled with arbitrary labels and arrows, axes labels, a title, date and time, and a key.

ftp://ftp.dartmouth.edu/pub/gnuplot/gnuplot3.5.tar.Z (Unix)
ftp://ftp.dartmouth.edu/pub/gnuplot/DOS34.zip

(Pre-compiled version for PC)

ISVAS 3.1 (Interactive Software for Visual data AnalysiS) is an end-user visualization system for the analysis of 3-D finite element simulations and of voxel data. It can be used for visualization of general unstructured grids with scalar or vector values defined in the grid nodes, or uniform grids with scalar values. ISVAS is a research prototype developed by Fraunhofer Institute for Computer Graphics (Fraunhofer-IGD, Darmstadt, Germany)

http://www.igd.fhg.de/www/igd-a4/projects/docs/isvas/isvas_e.html
ftp://ftp.igd.fhg.de/pub/isvas 

keh@melon.eastnet.co.cn writes:

[I would like to see] C++ source code for interpreting CGM format.

Victor writes:

The Computer Graphics Metafile (CGM) provides a file format for capturing and retrieving two-dimensional pictures. A set of elements is used for describing static pictures. This picture information can be exchanged between between different graphical software systems and between different graphical devices. CGM is both an ANSI and ISO standard.

Gplot is a CGM interpreter freely distributed by the Pittsburgh Supercomputing Center. This interpreter allows you to view images in CGM format. Gplot is written in C++ and will compile with either an AT&T C++ or GCC/G++ compiler. On a generic UNIX/X11 platform gplot will compile with either Motif or Xview.

For all Unix platforms:

ftp://anon.psc.edu/pub/gall/

For MS Windows:

ftp://ftp.psc.edu/pub/pcgplot/bin/pcgplot.exe

Note that gplot has nothing to do with GnuPlot.

kehongwei@hotmail.com replies:

Hi, Thanks for your information. I have a CGM application. Would you please tell me where to get the specifications of CGM. Thank you again for your help.

Victor writes:

For a description of how to order CGM specifications, see

http://www.backswc.com/cgm.htm

Since it is an ANSI publication, you will have to pay more than $200 for the specification. You may be better served by one of the following books.

The Cgm Handbook, by Lofton R. Henderson and Anne M. Mumford, September 1993, published by Academic Press, ISBN: 0125105606.

Cgm and Cgi: Metafile and Interface Standards for Computer Graphics, by David B. Arnold and Peter R. Bono, May 1988, published by Springer Verlag, ISBN: 0387189505.

These books are available from Amazon bookstore

http://www.amazon.com

gtg@inter.net.il writes:

I would like to see some source codes about VOC and MOD or MIDI programing in DOS mode 10X.

Victor writes:

I recommend you check out the following packages:

Varmint's Audio Tools (for MIDI)

ftp://x2ftp.oulu.fi/pub/msdos/programming/mxlibs/vat061.zip 

Sound Wizard Module Player (for MOD)

ftp://x2ftp.oulu.fi/pub/msdos/programming/mxlibs/swmp14.zip 

DiamondWard Sound Toolkit (VOC and MIDI)

ftp://x2ftp.oulu.fi/pub/msdos/programming/mxlibs/dwstk.zip 

As you might have guessed, I am a big fan of the X2 Support Group Game Development Archives:

ftp://x2ftp.oulu.fi

Victor R. Volkman received a BS in Computer Science from Michigan Technological University. He has been a frequent contributor to the C/C++ Users Journal since 1987. He is the author of the book Windows Programming with Shareware Tools. He can be reached at http://www.HAL9K.com/home.htm, or email to sysop@hal9k.com.