diff options
author | Tobias Klauser <tklauser@distanz.ch> | 2008-01-27 11:37:44 +0100 |
---|---|---|
committer | Tobias Klauser <tklauser@xenon.tklauser.home> | 2008-01-27 11:37:44 +0100 |
commit | 7e0f021a9aec35fd8e6725e87e3313b101d26f5e (patch) | |
tree | b1cacc4b24393f517aeb4610e9e1021f954307a8 /reference/CPLUSPLUS/SYNTAX |
Initial import (2.0.2-6)2.0.2-6
Diffstat (limited to 'reference/CPLUSPLUS/SYNTAX')
20 files changed, 1801 insertions, 0 deletions
diff --git a/reference/CPLUSPLUS/SYNTAX/Makefile.am b/reference/CPLUSPLUS/SYNTAX/Makefile.am new file mode 100644 index 0000000..28d46b6 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/Makefile.am @@ -0,0 +1,5 @@ +EXTRA_DIST = $(wildcard *.html) $(wildcard *.htm) $(wildcard *.gif) +docs_DATA = $(EXTRA_DIST) + +docsdir = $(kde_htmldir)/en/kdevelop/$(subdir) + diff --git a/reference/CPLUSPLUS/SYNTAX/Makefile.in b/reference/CPLUSPLUS/SYNTAX/Makefile.in new file mode 100644 index 0000000..29bb8a9 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/Makefile.in @@ -0,0 +1,410 @@ +# KDE tags expanded automatically by am_edit - $Revision: 1.2 $ +# Makefile.in generated automatically by automake 1.5 from Makefile.am. + +# Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001 +# Free Software Foundation, Inc. +# This Makefile.in is free software; the Free Software Foundation +# gives unlimited permission to copy and/or distribute it, +# with or without modifications, as long as this notice is preserved. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY, to the extent permitted by law; without +# even the implied warranty of MERCHANTABILITY or FITNESS FOR A +# PARTICULAR PURPOSE. + +@SET_MAKE@ + +SHELL = @SHELL@ + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ +prefix = @prefix@ +exec_prefix = @exec_prefix@ + +bindir = @bindir@ +sbindir = @sbindir@ +libexecdir = @libexecdir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +sharedstatedir = @sharedstatedir@ +localstatedir = @localstatedir@ +libdir = @libdir@ +infodir = @infodir@ +mandir = @mandir@ +includedir = @includedir@ +oldincludedir = /usr/include +pkgdatadir = $(datadir)/@PACKAGE@ +pkglibdir = $(libdir)/@PACKAGE@ +pkgincludedir = $(includedir)/@PACKAGE@ +top_builddir = ../../.. + +ACLOCAL = @ACLOCAL@ +AUTOCONF = @AUTOCONF@ +AUTOMAKE = @AUTOMAKE@ +AUTOHEADER = @AUTOHEADER@ + +INSTALL = @INSTALL@ +INSTALL_PROGRAM = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ +INSTALL_SCRIPT = @INSTALL_SCRIPT@ +INSTALL_HEADER = $(INSTALL_DATA) +transform = @program_transform_name@ +NORMAL_INSTALL = : +PRE_INSTALL = : +POST_INSTALL = : +NORMAL_UNINSTALL = : +PRE_UNINSTALL = : +POST_UNINSTALL = : +build_alias = @build_alias@ +build_triplet = @build@ +host_alias = @host_alias@ +host_triplet = @host@ +target_alias = @target_alias@ +target_triplet = @target@ +AMTAR = @AMTAR@ +ARTSCCONFIG = @ARTSCCONFIG@ +AS = @AS@ +AUTODIRS = @AUTODIRS@ +AWK = @AWK@ +CC = @CC@ +CONF_FILES = @CONF_FILES@ +CPP = @CPP@ +CXX = @CXX@ +CXXCPP = @CXXCPP@ +DCOPIDL = @DCOPIDL@ +DCOPIDL2CPP = @DCOPIDL2CPP@ +DCOP_DEPENDENCIES = @DCOP_DEPENDENCIES@ +DEPDIR = @DEPDIR@ +DLLTOOL = @DLLTOOL@ +DPMSINC = @DPMSINC@ +DPMSLIB = @DPMSLIB@ +EXEEXT = @EXEEXT@ +GCJ = @GCJ@ +GCJFLAGS = @GCJFLAGS@ +GLINC = @GLINC@ +GLLIB = @GLLIB@ +GMSGFMT = @GMSGFMT@ +IDL = @IDL@ +IDL_DEPENDENCIES = @IDL_DEPENDENCIES@ +INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ +JAR = @JAR@ +JAVAC = @JAVAC@ +JAVAH = @JAVAH@ +JVMLIBS = @JVMLIBS@ +KDECONFIG = @KDECONFIG@ +KDE_CXXFLAGS = @KDE_CXXFLAGS@ +KDE_EXTRA_RPATH = @KDE_EXTRA_RPATH@ +KDE_INCLUDES = @KDE_INCLUDES@ +KDE_LDFLAGS = @KDE_LDFLAGS@ +KDE_PLUGIN = @KDE_PLUGIN@ +KDE_RPATH = @KDE_RPATH@ +KDE_USE_CLOSURE_FALSE = @KDE_USE_CLOSURE_FALSE@ +KDE_USE_CLOSURE_TRUE = @KDE_USE_CLOSURE_TRUE@ +KDE_USE_FINAL_FALSE = @KDE_USE_FINAL_FALSE@ +KDE_USE_FINAL_TRUE = @KDE_USE_FINAL_TRUE@ +KDE_XSL_STYLESHEET = @KDE_XSL_STYLESHEET@ +LIBCOMPAT = @LIBCOMPAT@ +LIBCRYPT = @LIBCRYPT@ +LIBDL = @LIBDL@ +LIBGEN = @LIBGEN@ +LIBJPEG = @LIBJPEG@ +LIBMICO = @LIBMICO@ +LIBOBJS = @LIBOBJS@ +LIBPNG = @LIBPNG@ +LIBPTHREAD = @LIBPTHREAD@ +LIBPYTHON = @LIBPYTHON@ +LIBQIMGIO = @LIBQIMGIO@ +LIBRESOLV = @LIBRESOLV@ +LIBSHADOW = @LIBSHADOW@ +LIBSM = @LIBSM@ +LIBSOCKET = @LIBSOCKET@ +LIBTIFF = @LIBTIFF@ +LIBTOOL = @LIBTOOL@ +LIBUCB = @LIBUCB@ +LIBUTIL = @LIBUTIL@ +LIBXINERAMA = @LIBXINERAMA@ +LIBZ = @LIBZ@ +LIB_KAB = @LIB_KAB@ +LIB_KDECORE = @LIB_KDECORE@ +LIB_KDEUI = @LIB_KDEUI@ +LIB_KFILE = @LIB_KFILE@ +LIB_KFM = @LIB_KFM@ +LIB_KFORMULA = @LIB_KFORMULA@ +LIB_KHTML = @LIB_KHTML@ +LIB_KIMGIO = @LIB_KIMGIO@ +LIB_KIO = @LIB_KIO@ +LIB_KPARTS = @LIB_KPARTS@ +LIB_KSPELL = @LIB_KSPELL@ +LIB_KSYCOCA = @LIB_KSYCOCA@ +LIB_KWRITE = @LIB_KWRITE@ +LIB_QT = @LIB_QT@ +LIB_SMB = @LIB_SMB@ +LIB_X11 = @LIB_X11@ +LN_S = @LN_S@ +MCOPIDL = @MCOPIDL@ +MEINPROC = @MEINPROC@ +MICO_INCLUDES = @MICO_INCLUDES@ +MICO_LDFLAGS = @MICO_LDFLAGS@ +MOC = @MOC@ +MSGFMT = @MSGFMT@ +NOOPT_CXXFLAGS = @NOOPT_CXXFLAGS@ +NOREPO = @NOREPO@ +OBJDUMP = @OBJDUMP@ +OBJEXT = @OBJEXT@ +PACKAGE = @PACKAGE@ +PAMLIBS = @PAMLIBS@ +PASSWDLIBS = @PASSWDLIBS@ +PYTHONINC = @PYTHONINC@ +PYTHONLIB = @PYTHONLIB@ +PYTHONMODDIR = @PYTHONMODDIR@ +QT_INCLUDES = @QT_INCLUDES@ +QT_LDFLAGS = @QT_LDFLAGS@ +RANLIB = @RANLIB@ +REPO = @REPO@ +SETUIDFLAGS = @SETUIDFLAGS@ +STRIP = @STRIP@ +TOPSUBDIRS = @TOPSUBDIRS@ +UIC = @UIC@ +UIC_TR = @UIC_TR@ +USER_INCLUDES = @USER_INCLUDES@ +USER_LDFLAGS = @USER_LDFLAGS@ +USE_EXCEPTIONS = @USE_EXCEPTIONS@ +USE_RTTI = @USE_RTTI@ +USE_THREADS = @USE_THREADS@ +VERSION = @VERSION@ +XGETTEXT = @XGETTEXT@ +XPMINC = @XPMINC@ +XPMLIB = @XPMLIB@ +X_EXTRA_LIBS = @X_EXTRA_LIBS@ +X_INCLUDES = @X_INCLUDES@ +X_LDFLAGS = @X_LDFLAGS@ +X_PRE_LIBS = @X_PRE_LIBS@ +all_includes = @all_includes@ +all_libraries = @all_libraries@ +am__include = @am__include@ +am__quote = @am__quote@ +idldir = @idldir@ +install_sh = @install_sh@ +jni_includes = @jni_includes@ +kde_appsdir = @kde_appsdir@ +kde_bindir = @kde_bindir@ +kde_confdir = @kde_confdir@ +kde_datadir = @kde_datadir@ +kde_htmldir = @kde_htmldir@ +kde_icondir = @kde_icondir@ +kde_includes = @kde_includes@ +kde_libraries = @kde_libraries@ +kde_libs_htmldir = @kde_libs_htmldir@ +kde_libs_prefix = @kde_libs_prefix@ +kde_locale = @kde_locale@ +kde_mimedir = @kde_mimedir@ +kde_moduledir = @kde_moduledir@ +kde_qtver = @kde_qtver@ +kde_servicesdir = @kde_servicesdir@ +kde_servicetypesdir = @kde_servicetypesdir@ +kde_sounddir = @kde_sounddir@ +kde_templatesdir = @kde_templatesdir@ +kde_wallpaperdir = @kde_wallpaperdir@ +micodir = @micodir@ +qt_includes = @qt_includes@ +qt_libraries = @qt_libraries@ +x_includes = @x_includes@ +x_libraries = @x_libraries@ + +EXTRA_DIST = $(wildcard *.html) $(wildcard *.htm) $(wildcard *.gif) +docs_DATA = $(EXTRA_DIST) + +docsdir = $(kde_htmldir)/en/kdevelop/$(subdir) +subdir = reference/CPLUSPLUS/SYNTAX +mkinstalldirs = $(SHELL) $(top_srcdir)/admin/mkinstalldirs +CONFIG_HEADER = $(top_builddir)/config.h +CONFIG_CLEAN_FILES = +DIST_SOURCES = +DATA = $(docs_DATA) + +DIST_COMMON = Makefile.am Makefile.in +#>- all: all-am +#>+ 1 +all: docs-am all-am + +.SUFFIXES: + +mostlyclean-libtool: + -rm -f *.lo + +clean-libtool: + -rm -rf .libs _libs + +distclean-libtool: + -rm -f libtool +$(srcdir)/Makefile.in: Makefile.am $(top_srcdir)/configure.in $(ACLOCAL_M4) +#>- cd $(top_srcdir) && \ +#>- $(AUTOMAKE) --gnu reference/CPLUSPLUS/SYNTAX/Makefile +#>+ 3 + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu reference/CPLUSPLUS/SYNTAX/Makefile + cd $(top_srcdir) && perl admin/am_edit reference/CPLUSPLUS/SYNTAX/Makefile.in +Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status + cd $(top_builddir) && \ + CONFIG_HEADERS= CONFIG_LINKS= \ + CONFIG_FILES=$(subdir)/$@ $(SHELL) ./config.status +uninstall-info-am: +install-docsDATA: $(docs_DATA) + @$(NORMAL_INSTALL) + $(mkinstalldirs) $(DESTDIR)$(docsdir) + @list='$(docs_DATA)'; for p in $$list; do \ + if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " $(INSTALL_DATA) $$d$$p $(DESTDIR)$(docsdir)/$$f"; \ + $(INSTALL_DATA) $$d$$p $(DESTDIR)$(docsdir)/$$f; \ + done + +uninstall-docsDATA: + @$(NORMAL_UNINSTALL) + @list='$(docs_DATA)'; for p in $$list; do \ + f="`echo $$p | sed -e 's|^.*/||'`"; \ + echo " rm -f $(DESTDIR)$(docsdir)/$$f"; \ + rm -f $(DESTDIR)$(docsdir)/$$f; \ + done +tags: TAGS +TAGS: + + +#>- DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) +#>+ 4 +KDE_DIST=static.htm new.html syntax.htm class.html namespace.html ops.html keywords.html inline.html throw.html struct.html Master.html comment.html enum.html delete.html friend.html const.html bool.html operator.html + +DISTFILES= $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) $(KDE_DIST) + + +top_distdir = ../../.. +distdir = $(top_distdir)/$(PACKAGE)-$(VERSION) + +distdir: $(DISTFILES) + @for file in $(DISTFILES); do \ + if test -f $$file; then d=.; else d=$(srcdir); fi; \ + dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \ + if test "$$dir" != "$$file" && test "$$dir" != "."; then \ + $(mkinstalldirs) "$(distdir)/$$dir"; \ + fi; \ + if test -d $$d/$$file; then \ + cp -pR $$d/$$file $(distdir) \ + || exit 1; \ + else \ + test -f $(distdir)/$$file \ + || cp -p $$d/$$file $(distdir)/$$file \ + || exit 1; \ + fi; \ + done +check-am: all-am +check: check-am +all-am: Makefile $(DATA) + +installdirs: + $(mkinstalldirs) $(DESTDIR)$(docsdir) + +install: install-am +install-exec: install-exec-am +install-data: install-data-am +uninstall: uninstall-am + +install-am: all-am + @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am + +installcheck: installcheck-am +install-strip: + $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ + `test -z '$(STRIP)' || \ + echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install +mostlyclean-generic: + +clean-generic: + +distclean-generic: + -rm -f Makefile $(CONFIG_CLEAN_FILES) stamp-h stamp-h[0-9]* + +maintainer-clean-generic: + @echo "This command is intended for maintainers to use" + @echo "it deletes files that may require special tools to rebuild." +#>- clean: clean-am +#>+ 1 +clean: kde-rpo-clean clean-am + +clean-am: clean-generic clean-libtool mostlyclean-am + +distclean: distclean-am + +distclean-am: clean-am distclean-generic distclean-libtool + +dvi: dvi-am + +dvi-am: + +info: info-am + +info-am: + +install-data-am: install-docsDATA + +install-exec-am: + +install-info: install-info-am + +install-man: + +installcheck-am: + +maintainer-clean: maintainer-clean-am + +maintainer-clean-am: distclean-am maintainer-clean-generic + +mostlyclean: mostlyclean-am + +mostlyclean-am: mostlyclean-generic mostlyclean-libtool + +uninstall-am: uninstall-docsDATA uninstall-info-am + +.PHONY: all all-am check check-am clean clean-generic clean-libtool \ + distclean distclean-generic distclean-libtool distdir dvi \ + dvi-am info info-am install install-am install-data \ + install-data-am install-docsDATA install-exec install-exec-am \ + install-info install-info-am install-man install-strip \ + installcheck installcheck-am installdirs maintainer-clean \ + maintainer-clean-generic mostlyclean mostlyclean-generic \ + mostlyclean-libtool uninstall uninstall-am uninstall-docsDATA \ + uninstall-info-am + +# Tell versions [3.59,3.63) of GNU make to not export all variables. +# Otherwise a system limit (for SysV at least) may be exceeded. +.NOEXPORT: + +#>+ 2 +docs-am: + +#>+ 6 +force-reedit: + cd $(top_srcdir) && \ + $(AUTOMAKE) --gnu reference/CPLUSPLUS/SYNTAX/Makefile + cd $(top_srcdir) && perl admin/am_edit reference/CPLUSPLUS/SYNTAX/Makefile.in + + +#>+ 2 +final: + $(MAKE) all-am +#>+ 2 +final-install: + $(MAKE) install-am +#>+ 2 +no-final: + $(MAKE) all-am +#>+ 2 +no-final-install: + $(MAKE) install-am +#>+ 3 +cvs-clean: + $(MAKE) -f $(top_srcdir)/admin/Makefile.common cvs-clean + +#>+ 3 +kde-rpo-clean: + -rm -f *.rpo diff --git a/reference/CPLUSPLUS/SYNTAX/Master.html b/reference/CPLUSPLUS/SYNTAX/Master.html new file mode 100644 index 0000000..1b12bf5 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/Master.html @@ -0,0 +1,42 @@ +<html> +<head> +<title></title> +</head> + +<body bgcolor="#cccccc" text="brown"> + +<hr> +<h1> +<center>C++ Syntax</center> +</h1> + +<hr> + +Text goes here. + + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html"> Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html"> Master Index</a> +</td><td width="25%"> +<a href="keywords.html"> C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm"> Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<address>Martin Leslie +</address> +<p> +</font> +</body> +</html> diff --git a/reference/CPLUSPLUS/SYNTAX/bool.html b/reference/CPLUSPLUS/SYNTAX/bool.html new file mode 100644 index 0000000..14c2ffe --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/bool.html @@ -0,0 +1,48 @@ +<html> +<head> +<title>bool keyword (datatype)</title> +</head> + +<body bgcolor="#cccccc"> +<font color="brown"> + +<hr> +<h1> +<center>bool keyword (datatype)</center> +</h1> + +<hr> +<b>bool</b> is new to C++. It is not available in all versions +of the compiler as it is a recent addition. + +<p> +<font color=black> +The original datatypes fount in C are +<a href="../../C/CONCEPT/data_types.html">here</a> +</font> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html"> Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html"> Master Index</a> +</td><td width="25%"> +<a href="keywords.html"> C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm"> Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<address>Martin Leslie +</address> +<p> +</font> +</body> +</html> diff --git a/reference/CPLUSPLUS/SYNTAX/class.html b/reference/CPLUSPLUS/SYNTAX/class.html new file mode 100644 index 0000000..45ec2af --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/class.html @@ -0,0 +1,185 @@ +<title>CLASS keyword</title> +<!-- Changed by: Martin Leslie, 14-Mar-1996 --> +<body bgcolor=#dddddd> +<font color=brown> +<hr> +<center><h1>class keyword</h1></center> +<hr> +<p> +The concept of a class +allows you to +<a href=../../C/glossary.html#encapsulation>encapsulate</a> + a set of related variables and only +allow access to them via predetermined functions. +<p> + +The <b>class</b> keyword is used to declare the group of variables +and functions and the visability of the variables and functions. +Here is a basic example. + +<p> +<center> +<table width="80%" border="1" bgcolor="ivory"> +<tr> +<td> +<pre> + + class String + { + public: + + void Set(char *InputStr) // Declare an Access function + { + strcpy(Str, InputStr); + } + + private: + + char Str[80]; // Declare a hidden variable. + + }; +</pre> +</td> +</tr> +</table> +</center> +<p> + +<ul> +<li><b>private:</b> means that all variables and functions that + follow are only visable from within the class. + +<li><b>public:</b> all functions and variables that follow this + statement can be accessed from outside the class. +</ul> + +Now we have declared a class called <b>String</b> we need to +use it. +<p> +<center> +<table width="80%" border="1" bgcolor="ivory"> +<tr> +<td> +<pre> + + main() + { + String Title; + + Title.Set("My First Masterpiece."); + } +</pre> +</td> +</tr> +</table> +</center> +<p> + +This code creates a String +<a href=../../C/glossary.html#class_object>object</a> +called Title and then uses the <b>Set</b> member function +to initialise the value of <b>Str</b>. +<p> +In C++ the member function <b>Set</b> is also known as a +<a href=../../C/glossary.html#method>method</a> +<p> +This is the strength +of object oriented programming, the ONLY way to change +<b>Str</b> is via the <b>Set</b> method. + +<p> + +The final code example brings the last two examples together +ands a new method (called Get) that shows the contents of +<b>Str</b> + +<p> +<center> +<table width="80%" border="1" bgcolor="ivory"> +<tr> +<td> +<pre> + + #include <stdlib.h> + #include <iostream.h> // Instead of stdio.h + + class String + { + public: + + void Set(char *InputStr) // Declare an Access function + { + strcpy(Str, InputStr); + } + <b> + char *Get(void) // Declare an Access function + { + return(Str); + } + </b> + + private: + + char Str[80]; // Declare a hidden variable. + + }; + + main() + { + String Title; + + Title.Set("My First Masterpiece."); + + <b>cout << Title.Get() << endl;</b> + } +</pre> +</td> +</tr> +</table> +</center> +<p> + + +<hr> +<h2>Examples:</h2> +<img src="../../GRAPHICS/computer.gif"> +<a href="../EXAMPLES/class1.cc">Example program.</a> +<hr> +<h2>See Also:</h2> + +<img src="../../GRAPHICS/whiteball.gif"> +<a href="../CONCEPT/constructor.html">Constructors and destructors.</a> +<p> +<img src="../../GRAPHICS/whiteball.gif"> +<a href="../CONCEPT/inheritance.html">Class Inheritance.</a> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<p> + +<hr> +<p> +<center> +<table border=2 width=80% bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +08-Feb-96</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/comment.html b/reference/CPLUSPLUS/SYNTAX/comment.html new file mode 100644 index 0000000..b085c90 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/comment.html @@ -0,0 +1,73 @@ +<head> +<title>C++ Comments.</title> +</head> +<body bgcolor=#dddddd> +<font color=brown> +<hr> +<center> +<h1>C++ Comments.</h1> +</center> +<hr> +<p> +C++ allows <b>//</b> as an inline comment, it can be used on any line and is +delimited by the newline character (return). +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr> +<td> +<pre> + + main() + { + int Counter = 0; // Initalise Counter. + + /* Start the main processing here. */ + } + +</pre> +</td> +</tr> +</table> +</center> +<p> +A handy feature of the new comments is the ability to nest them within the +old style comments. +<p> +This provides a handy debugging tool. If you write your normal comments +using the <b>//</b> syntax, you can then comment out blocks of code while +debugging with <b> /* */</b> + +</font> +<font color=black> +<hr> +<h2>C comments</h3> +<img src="../../GRAPHICS/whiteball.gif"> +<a href="../../C/SYNTAX/comments.html">/* ... */ comments</a> +<p> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> + + +<hr> +<font color=brown> +<address>Martin Leslie +30-Jan-96</address> +</font> diff --git a/reference/CPLUSPLUS/SYNTAX/const.html b/reference/CPLUSPLUS/SYNTAX/const.html new file mode 100644 index 0000000..8c28d35 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/const.html @@ -0,0 +1,44 @@ +<title>const keyword</title> + +<head> +<script language="JavaScript" src="../../JAVASCRIPT/standard.js"> +</script> +</head> + +<body bgcolor="#dddddd"> +<font color=brown> +<hr> +<center><h1>const keyword</h1></center> +<hr> +<p> +In the C++ world, the use of <b>const</b> is considered to be an +improvement over <a href=../../C/SYNTAX/preprocessors.html>#define</a> +in general the usual +<a href="../../C/SYNTAX/const.html">C programming rules</a> apply. +There is one exception within a class, this is because the class syntax +does not allow the assignment of a variable when it is declared. The result +is a rather strange looking syntax. Please see the example below. +<p> + +<hr> +<h2>Examples:</h2> +<img src="../../GRAPHICS/computer.gif" alt="o"> +<a href="../EXAMPLES/const1.cc">Example program.</a> +<hr> +<h2>See Also:</h2> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="../../C/SYNTAX/const.html">C version of const.</a> +<br> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="../../C/CONCEPT/constants.html">Theory of constants.</a> +<p> + +<script> +tail("27-Sep-98"); +</script> + diff --git a/reference/CPLUSPLUS/SYNTAX/delete.html b/reference/CPLUSPLUS/SYNTAX/delete.html new file mode 100644 index 0000000..224c487 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/delete.html @@ -0,0 +1,111 @@ +<title>DELETE keyword</title> +<!-- Changed by: Martin Leslie, 14-Mar-1996 --> +<body bgcolor="#dddddd"> +<font color=brown> +<hr> +<center><h1>DELETE keyword</h1></center> +<hr> +<p> +The <b>delete</b> keyword replaces the +<a href="../../C/FUNCTIONS/free.html">free</a> +function in C and will release storage reserved with +<a href="new.html">new</a>. + +<p> +<center> +<table bgcolor=ivory width="80%" border=1> +<tr> +<td> +<pre> + + int *ptr1; // Declare a pointer to int. + ptr1 = new int; // Reserve storage and point to it. + + float *ptr2 = new float; // Do it all in one statement. + + <b>delete</b> ptr1; // Free the storage. + <b>delete</b> ptr2; + + struct House // Declare a complex structure. + { + int Floors; + int Windows; + }; + + House *ptr3 = new House; // Reserve storage and point to it. + + <b>delete</b> ptr3; +</pre> +</td> +</tr> +</table> +</center> +<p> + +Blocks or arrays of storage can also be freed as shown in the +next example. + +<p> +<center> +<table bgcolor=ivory width="80%" border=1> +<tr> +<td> +<pre> + + char *ptr + ptr = new char[80]; + + <b>delete</b> [] ptr; // Free the storage. +</pre> +</td> +</tr> +</table> +</center> +<p> + + +<hr> +<h2>Examples:</h2> +<img src="../../GRAPHICS/computer.gif" alt="o"> +<a href="..//EXAMPLES/new.cc">Example program.</a> +<hr> +<h2>See Also:</h2> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="new.html">new</a> keyword. + +</font> +<font color=black> +<h2>C References</h2> +<p> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="../../C/FUNCTIONS/malloc.html">malloc</a> function. + +<p> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="../../C/FUNCTIONS/free.html">free</a> function. +</font> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +17-Feb-96</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/enum.html b/reference/CPLUSPLUS/SYNTAX/enum.html new file mode 100644 index 0000000..0f48a16 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/enum.html @@ -0,0 +1,110 @@ +<HTML>
+<HEAD>
+ <TITLE>ENUM keyword</TITLE>
+</HEAD>
+
+<BODY BGCOLOR="#DDDDDD">
+
+<HR>
+<CENTER>
+<H1>
+<FONT COLOR="#A52A2A">C++ changes to ENUM.</FONT>
+</H1>
+</CENTER>
+
+<HR>
+
+<P><FONT COLOR="#A52A2A">In the C++ world, the rules applying to
+<B>enum</B> have been altered.
+
+<ul>
+<li>Definitions no longer require the enum prefix or a
+<a href=../../C/SYNTAX/typedef.html>typedef</a> fudge.
+</ul>
+<CENTER><TABLE BORDER=0 COLS=1 WIDTH="80%" BGCOLOR="ivory" >
+<TR>
+<TD>
+<pre>
+
+ main ()
+ {
+ enum Currancy = {STERLING, DOLLAR, RUPEE};
+
+ enum Currancy GreenBack = DOLLAR; // Valid in C and C++
+ Currancy Pounds = STERLING; // Valid in C++ only.
+
+ }
+</pre>
+</TD>
+</TR>
+</TABLE></CENTER>
+
+
+
+<UL>
+<LI>
+<FONT COLOR="#A52A2A">An <B>enum</B> is no longer considered to be an int
+datatype. Because it has its own datatype you can not perform normal arithmatic
+apon <B>enum</B> variables. The following program is now invalid.</FONT></LI>
+</UL>
+<CENTER><TABLE BORDER=0 COLS=1 WIDTH="80%" BGCOLOR="ivory" >
+<TR>
+<TD>
+<pre>
+
+ main ()
+ {
+ enum Currancy = {STERLING, DOLLAR, RUPEE};
+
+ Currancy Pounds = STERLING;
+
+ Pounds = 2; // Invalid Statement.
+
+ Pounds++; // Invalid Statement.
+ }
+</pre>
+</TD>
+</TR>
+</TABLE></CENTER>
+
+<P>
+<HR>
+<H2>
+<FONT COLOR="#A52A2A">Examples:</FONT></H2>
+<IMG SRC="../../GRAPHICS/computer.gif" ALT="o" ><FONT COLOR="#A52A2A"> <A HREF="../EXAMPLES/enum1.cc">Example
+program.</A> </FONT>
+<HR>
+<H2>
+<FONT COLOR="#A52A2A">See Also:</FONT></H2>
+
+<HR>
+<H2>
+<FONT COLOR="#000000">C References</FONT></H2>
+<IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o"><FONT COLOR="#000000"> <A HREF="../../C/SYNTAX/enum.html">C
+version of <B>enum</B>.</A></FONT>
+
+<P>
+<hr>
+<center>
+<table border=2 width="80%" bgcolor="ivory">
+<tr align=center>
+<td width="25%">
+<a href="../cref.html">Top</a>
+</td><td width="25%">
+<a href="../../C/master_index.html">Master Index</a>
+</td><td width="25%">
+<a href="keywords.html">C++ Keywords</a>
+</td><td width="25%">
+<a href="../../C/FUNCTIONS/funcref.htm">Functions</a>
+</td>
+</tr>
+</table>
+</center>
+<p>
+<hr>
+<font color=brown>
+<address>Martin Leslie
+25-Oct-98</address><p>
+
+</BODY>
+</HTML>
diff --git a/reference/CPLUSPLUS/SYNTAX/friend.html b/reference/CPLUSPLUS/SYNTAX/friend.html new file mode 100644 index 0000000..40262bf --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/friend.html @@ -0,0 +1,44 @@ +<title>FRIEND keyword</title> +<!-- Changed by: Martin Leslie, 14-Mar-1996 --> +<body bgcolor="#dddddd"> +<font color=brown> +<hr> +<center><h1>friend keyword</h1></center> +<hr> +<p> +The <b>friend</b> keyword +<p> + +<hr> +<h2>See Also:</h2> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<p> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +08-Dec-96</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/inline.html b/reference/CPLUSPLUS/SYNTAX/inline.html new file mode 100644 index 0000000..6f136dd --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/inline.html @@ -0,0 +1,51 @@ +<title>INLINE keyword</title> +<!-- Changed by: Martin Leslie, 14-Mar-1996 --> +<body bgcolor="#dddddd"> +<font color=brown> +<hr> +<center><h1>INLINE keyword</h1></center> +<hr> +<p> +The <b>inline</b> keyword allows C++ programmers to dispence macros created with the +<a href="../../C/SYNTAX/macros.html">#define</a> preprocessor. +<p> + +<hr> +<h2>Examples:</h2> +<img src="../../GRAPHICS/computer.gif" alt="o"> +<a href="../EXAMPLES/inline.cc">Example program.</a> +<hr> +<h2>See Also:</h2> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<p> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="../../C/SYNTAX/macros.html">macros</a>. + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +17-Feb-96</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/keywords.html b/reference/CPLUSPLUS/SYNTAX/keywords.html new file mode 100644 index 0000000..c3ac3c0 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/keywords.html @@ -0,0 +1,94 @@ +<!doctype html public "-//w3c//dtd html 4.0 transitional//en"> +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <meta name="GENERATOR" content="Mozilla/4.5 [en] (X11; I; Linux 2.0.36 i586) [Netscape]"> + <title>C++ keywords.</title> +</head> +<body text="#A52A2A" bgcolor="#CCCCCC" ,> + +<hr> +<center> +<h1> +C++ keywords.</h1></center> + +<hr>Some of the keywords on C have new meanings or have been overloaded +in the world of C++, the following list shows the keywords that have changed. +<center><table BORDER=2 CELLPADDING=5 BGCOLOR="#FFFFF0" > +<tr ALIGN=CENTER> +<td><a href="struct.html">struct</a></td> + +<td><a href="static.htm">static</a></td> + +<td><a href="const.html">const</a></td> + +<td><a href="enum.html">enum</a></td> +</tr> +</table></center> + +<p> +<hr>The following list shows the keywords that have been added to C++. +<center><table BORDER=2 CELLPADDING=5 BGCOLOR="#FFFFF0" > +<tr ALIGN=CENTER> +<td><a href="bool.html">bool</a></td> + +<td><a href="throw.html">catch</a></td> + +<td><a href="class.html">class</a></td> + +<td><a href="delete.html">delete</a></td> + +<td><a href="friend.html">friend</a></td> + +<td><a href="inline.html">inline</a></td> +</tr> + +<tr ALIGN=CENTER> +<td><a href="new.html">new</a></td> + +<td><a href="namespace.html">namespace</a></td> + +<td><a href="operator.html">operator</a></td> + +<td>private </td> + +<td>protected </td> + +<td>public </td> +</tr> + +<tr ALIGN=CENTER> +<td>tempate </td> + +<td>this </td> + +<td><a href="throw.html">throw </a></td> + +<td><a href="throw.html">try </a></td> + +<td>template </td> +</tr> +</table></center> + +<p> +<hr><font color="#000000">The base C keywords are <a href="../../C/SYNTAX/keywords.html">here</a></font> +<hr> +<center><table BORDER=2 WIDTH="80%" BGCOLOR="#FFFFF0" > +<tr ALIGN=CENTER> +<td WIDTH="25%"><a href="../cref.html">Top</a></td> + +<td WIDTH="25%"><a href="../../C/master_index.html">Master Index</a></td> + +<td WIDTH="25%"><a href="keywords.html">C++ Keywords</a></td> + +<td WIDTH="25%"><a href="../../C/FUNCTIONS/funcref.htm">Functions</a></td> +</tr> +</table></center> + +<p> +<hr> +<address> +Martin Leslie 08-Dec-96</address> + +</body> +</html> diff --git a/reference/CPLUSPLUS/SYNTAX/namespace.html b/reference/CPLUSPLUS/SYNTAX/namespace.html new file mode 100644 index 0000000..a4536d3 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/namespace.html @@ -0,0 +1,45 @@ +<title>NAMESPACE keyword</title> +<body bgcolor=#cccccc> +<font color=brown> +<hr> +<center><h1>namespace keyword</h1></center> +<hr> +<p> +The <b>namespace</b> keyword is a new addition to C++. Not all +compilers support the <b>namespace</b> features. As my compiler +does not support is feature, I am unable to document it at this time :-( +<p> + +<hr> +<h2>See Also:</h2> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<p> + +<hr> +<p> +<center> +<table border=2 width=80% bgcolor="ivory"> +<tr align=center> +<td width=25%> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +08-Aug-97</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/new.html b/reference/CPLUSPLUS/SYNTAX/new.html new file mode 100644 index 0000000..bd077fd --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/new.html @@ -0,0 +1,125 @@ +<title>NEW operator</title> +<!-- Changed by: Martin Leslie, 14-Mar-1996 --> +<body bgcolor="#dddddd"> +<font color=brown> +<hr> +<center><h1>NEW operator.</h1></center> +<hr> +<p> +The <b>new</b> operator replaces the +<a href="../../C/FUNCTIONS/malloc.html">malloc</a> +function provided in C to reserve storage taken from the heap. +<p> +The <b>new</b> operator requires one operand that describes the +type of data to be stored in the memory. Here are some examples. +<p> +<center> +<table bgcolor=ivory width="80%" border=1> +<tr> +<td> +<pre> + + int *ptr1; // Declare a pointer to int. + ptr1 = new int; // Reserve storage and point to it. + + float *ptr2 = new float; // Do it all in one statement. + + delete ptr1; // Free the storage. + delete ptr2; + + struct House // Declare a complex structure. + { + int Floors; + int Windows; + }; + + House *ptr3 = new House; // Reserve storage and point to it. + + delete ptr3; +</pre> +</td> +</tr> +</table> +</center> +<p> + +Blocks or arrays of storage can also be reserved as show in the +next example. + +<p> +<center> +<table bgcolor=ivory width="80%" border=1> +<tr> +<td> +<pre> + + char *ptr + ptr = new char[80]; + + delete [] ptr; // Free the storage. +</pre> +</td> +</tr> +</table> +</center> +<p> + + + +Although <b>new</b> and +<a href="../../C/FUNCTIONS/malloc.html">malloc</a> +can be intermixed in the same code, it is probably best +to continue using +<a href="../../C/FUNCTIONS/malloc.html">malloc</a> +in existing code and <b>new</b> in new code. This is because +you can not use +<a href="delete.html">delete</a> with storage thats been +reserved with malloc and visa versa. If you keep to one +method or the other you are less likely to make a mistake. +<p> +<hr> +<h2>Examples:</h2> +<img src="../../GRAPHICS/computer.gif"> +<a href="../EXAMPLES/new.cc">Example program.</a> +<hr> +<h2>See Also:</h2> +<img src="../../GRAPHICS/whiteball.gif"> +<a href="delete.html">delete</a> keyword. + +</font> +<hr> +<font color=black> +<h2>C References</h2> +<p> +<img src="../../GRAPHICS/whiteball.gif"> +<a href="../../C/FUNCTIONS/malloc.html">malloc</a> function. + +<p> +<img src="../../GRAPHICS/whiteball.gif"> +<a href="../../C/FUNCTIONS/free.html">free</a> function. +</font> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +17-Feb-96</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/operator.html b/reference/CPLUSPLUS/SYNTAX/operator.html new file mode 100644 index 0000000..1ce4153 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/operator.html @@ -0,0 +1,44 @@ +<title>INLINE keyword</title> +<!-- Changed by: Martin Leslie, 14-Mar-1996 --> +<body bgcolor=#dddddd> +<font color=brown> +<hr> +<center><h1>operator keyword</h1></center> +<hr> +<p> +The <b>operator</b> keyword +<p> + +<hr> +<h2>See Also:</h2> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<p> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +08-Dec-96</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/ops.html b/reference/CPLUSPLUS/SYNTAX/ops.html new file mode 100644 index 0000000..8cf8d04 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/ops.html @@ -0,0 +1,69 @@ +<head> +<title>C++ Operators</title> +</head> + +<body bgcolor=#dddddd> +<font color=brown> +<hr> +<center><h1>C++ Operators</h1></center> +<hr> +<p> +The following operators have been introducedor overloaded within C++. +<p> +<pre> + :: <a href=../CONCEPT/scope.html>Scope.</a> Identifies a global variable. + << Insertion. + >> Extraction. + + Apparantly <b>new</b> and <b>delete</b> are operators, not keywords. + + <a href=../SYNTAX/new.html>new</a> Dynamc allocation operator + <a href=../SYNTAX/delete.html>delete</a> Free memory. + +</pre> + +<hr> +<h2>Examples:</h2> +<!--- +<img src="../../GRAPHICS/computer.gif" alt="o"> +<a href="../EXAMPLES/operator.cc">Example program.</a> +---> +<hr> +<h2>See Also:</h2> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<a href="../../C/CONCEPT/expressions.html">Base operators offered by C</a> +<p> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<font color=brown> +<address>Martin Leslie +<script language="JavaScript"> +<!-- // +document.write(document.lastModified); +// --> +</script> +</address><p> +</font> + diff --git a/reference/CPLUSPLUS/SYNTAX/static.htm b/reference/CPLUSPLUS/SYNTAX/static.htm new file mode 100644 index 0000000..a3be440 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/static.htm @@ -0,0 +1,89 @@ + +<head> +<title>static keyword</title> +</head> + +<body bgcolor="#cccccc"> +<font color=brown> +<hr> +<center><h1>static keyword</h1></center> +<hr> +<p> +The <b>static</b> keyword has been extended in C++ to have the +following meanings. +<p> + +<table bgcolor="ivory" border=2> +<th>C++ Context</th> +<th>Action</th> +<tr> +<td> +A variable outside of a function. +</td> +<td> +Variable can be seen by all functions in the file. Default. +</td> +</tr> +<tr> +<td> +Variable inside a function. +</td> +<td> +The variable is permanent. The variable can only be initalised +once and only one copy of the variable exists. Recursive calls +use the same variable. +</td> +</tr> +<tr> +<td> +A class member variable +</td> +<td> +Only one copy of the variable exists. All instances of the object +use the same variable (memory location). +</td> +</tr> +<tr> +<td> +A class member function (method). +</td> +<td> +Function can only access static members of the class +</td> +</tr> +</table> +<p> + +<hr> +<a href="../../C/SYNTAX/storage_class.html#static">Here is the way static works in C</a> +<hr> +<h2>See Also:</h2> +<hr> + +</font> +<font color=black> +<h2>C References</h2> +<p> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html">Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html">Master Index</a> +</td><td width="25%"> +<a href="keywords.html">C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm">Functions</a> +</td> +</tr> +</table> +</center> +<p> + +<hr> +<address>Martin Leslie +08-Dec-96</address> diff --git a/reference/CPLUSPLUS/SYNTAX/struct.html b/reference/CPLUSPLUS/SYNTAX/struct.html new file mode 100644 index 0000000..57df58a --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/struct.html @@ -0,0 +1,102 @@ +<html> +<head> +<title>STRUCT keyword</title> +</head> + +<body> +<font color=brown> +<hr> +<h1> +<center>struct keyword in C++</center> +</h1> +<hr> + +<p> +The <b>struct</b> keyword was introduced in 'C', its original functionality +is documented +<a href=../../C/SYNTAX/struct.html>here.</a> +<p> + +C++ has added two new features to structures. +<ol> +<li>The syntax has been improved slightly so you no longer have to + mess around with <a href=../../C/SYNTAX/typedef.html>typedef</a> statements. + + <p> + <center> + <table border=1 width="80%" bgcolor="ivory"> + <tr><td align=center> + <h3>ANSI C approch to structures.</h3> + </tr></td> + <tr><td> + <pre> + + typedef struct Person {int age; char *name} Person_t; + + struct Person FirstMan; + Person_t SecondMan; + </pre> + </td></tr></table> + <p> + + <p> + <table border=1 width="80%" bgcolor="ivory"> + <tr><td align=center> + <h3>C++ structures.</h3> + </tr></td> + <tr><td> + <pre> + + struct Person {int age; char *name}; + + Person FirstMan; + Person SecondMan; + </pre> + </td></tr></table> + </center> + <p> + +<li>C++ also took the original idea of structures and added the ability to + associate functions with the data within the structure. This feature + was wrapped up with the introduction of the + <a href="class.html">class</a> keyword. +</ol> +<p> +<hr> +<h2>Examples:</h2> +<img src="../../GRAPHICS/computer.gif"> +<a href="../EXAMPLES/struct1.cc">Example program.</a> +<p> +<hr> +<h2>See Also:</h2> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="keywords.html">C++ Keywords</a> +<br> +<img src="../../GRAPHICS/whiteball.gif" alt="o"> +<a href="../../C/SYNTAX/keywords.html">C Keywords</a> +<p> + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html"> Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html"> Master Index</a> +</td><td width="25%"> +<a href="keywords.html"> C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm"> Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<address>Martin Leslie +12 Nov 98</address><p> +</font> +</body> +</html> diff --git a/reference/CPLUSPLUS/SYNTAX/syntax.htm b/reference/CPLUSPLUS/SYNTAX/syntax.htm new file mode 100644 index 0000000..1d934a5 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/syntax.htm @@ -0,0 +1,60 @@ +<HTML>
+<HEAD>
+ <TITLE>C++ Syntax</TITLE>
+</HEAD>
+<BODY>
+
+<CENTER>
+
+<hr>
+<H1>
+C++ Syntax</H1></CENTER>
+
+<HR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="keywords.html">C++ Keywords</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../../C/SYNTAX/keywords.html">C
+Keywords</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="comment.html">C++ Comments.</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="ops.html">C++ Operators.</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../CONCEPT/cast.html">C++ Cast</A>
+
+<h3>Function Enhancements in C++</h3>
+
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../CONCEPT/funcoverload.html">Function Overloading</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../CONCEPT/fundefault.html">Default Parameters values.</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../CONCEPT/reference_variable.html">Reference variables.</A>
+
+<h3>Object Oriented features within C++</h3>
+
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../SYNTAX/class.html"> class statement</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../CONCEPT/constructor.html"> Constructors and Destructors.</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../SYNTAX/inline.html"> Inline methods.</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../CONCEPT/inheritance.html"> Inheritance</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../SYNTAX/friend.html"> Friends of classes.</A>
+<BR><IMG SRC="../../GRAPHICS/whiteball.gif" ALT="o" > <A HREF="../SYNTAX/operator.html"> Operator Ovrloading.</A>
+
+<p>
+<HR>
+<CENTER><TABLE BORDER=2 WIDTH="80%" BGCOLOR="#FFFFF0" >
+<TR ALIGN=CENTER>
+<TD WIDTH="25%"><A HREF="../cref.html">Top</A> </TD>
+
+<TD WIDTH="25%"><A HREF="../../C/master_index.html">Master Index</A> </TD>
+
+<TD WIDTH="25%"><A HREF="keywords.html">C++ Keywords</A> </TD>
+
+<TD WIDTH="25%"><A HREF="../../C/FUNCTIONS/funcref.htm">Functions</A> </TD>
+</TR>
+</TABLE></CENTER>
+
+<HR WIDTH="100%">
+<BR><ADDRESS>
+Martin Leslie
+<script language="JavaScript">
+<!-- //
+document.write(document.lastModified);
+// -->
+</script>
+</ADDRESS>
+
+</BODY>
+</HTML>
diff --git a/reference/CPLUSPLUS/SYNTAX/throw.html b/reference/CPLUSPLUS/SYNTAX/throw.html new file mode 100644 index 0000000..d541374 --- /dev/null +++ b/reference/CPLUSPLUS/SYNTAX/throw.html @@ -0,0 +1,50 @@ +<html> +<head> +<title>catch, throw and try keywords.</title> +</head> + +<body bgcolor="#cccccc" text="brown"> + +<hr> +<h1> +<center>catch, throw and try keywords.</center> +</h1> + +<hr> + +Text goes here. + +<hr> +<h2>Examples:</h2> +<img src="../../GRAPHICS/computer.gif"> +<a href="../EXAMPLES/throw.cc">A quick example.</a> +<hr> +<h2>See Also:</h2> +<hr> + + +<hr> +<p> +<center> +<table border=2 width="80%" bgcolor="ivory"> +<tr align=center> +<td width="25%"> +<a href="../cref.html"> Top</a> +</td><td width="25%"> +<a href="../../C/master_index.html"> Master Index</a> +</td><td width="25%"> +<a href="keywords.html"> C++ Keywords</a> +</td><td width="25%"> +<a href="../../C/FUNCTIONS/funcref.htm"> Functions</a> +</td> +</tr> +</table> +</center> +<p> +<hr> +<address>Martin Leslie +</address> +<p> +</font> +</body> +</html> |