C++ Neural Networks and Fuzzy Logic
by Valluru B. Rao
MTBooks, IDG Books Worldwide, Inc.
ISBN: 1558515526 Pub Date: 06/01/95
Previous Table of Contents Next
C++ Program for a Hopfield Network
For convenience every C++ program has two components: One is the header file with all of the class
declarations and lists of include library files; the other is the source file that includes the header file and the
detailed descriptions of the member functions of the classes declared in the header file. You also put the
function main in the source file. Most of the computations are done by class member functions, when class
objects are created in the function main, and calls are made to the appropriate functions. The header file has
an .h (or .hpp) extension, as you know, and the source file has a .cpp extension, to indicate that it is a C++
code file. It is possible to have the contents of the header file written at the beginning of the .cpp file and work
with one file only, but separating the declarations and implementations into two files allows you to change the
implementation of a class(.cpp) without changing the interface to the class (.h).
Do'stlaringiz bilan baham: |