From 7e0f021a9aec35fd8e6725e87e3313b101d26f5e Mon Sep 17 00:00:00 2001 From: Tobias Klauser Date: Sun, 27 Jan 2008 11:37:44 +0100 Subject: Initial import (2.0.2-6) --- reference/CPLUSPLUS/SYNTAX/Makefile.am | 5 + reference/CPLUSPLUS/SYNTAX/Makefile.in | 410 ++++++++++++++++++++++++++++++ reference/CPLUSPLUS/SYNTAX/Master.html | 42 +++ reference/CPLUSPLUS/SYNTAX/bool.html | 48 ++++ reference/CPLUSPLUS/SYNTAX/class.html | 185 ++++++++++++++ reference/CPLUSPLUS/SYNTAX/comment.html | 73 ++++++ reference/CPLUSPLUS/SYNTAX/const.html | 44 ++++ reference/CPLUSPLUS/SYNTAX/delete.html | 111 ++++++++ reference/CPLUSPLUS/SYNTAX/enum.html | 110 ++++++++ reference/CPLUSPLUS/SYNTAX/friend.html | 44 ++++ reference/CPLUSPLUS/SYNTAX/inline.html | 51 ++++ reference/CPLUSPLUS/SYNTAX/keywords.html | 94 +++++++ reference/CPLUSPLUS/SYNTAX/namespace.html | 45 ++++ reference/CPLUSPLUS/SYNTAX/new.html | 125 +++++++++ reference/CPLUSPLUS/SYNTAX/operator.html | 44 ++++ reference/CPLUSPLUS/SYNTAX/ops.html | 69 +++++ reference/CPLUSPLUS/SYNTAX/static.htm | 89 +++++++ reference/CPLUSPLUS/SYNTAX/struct.html | 102 ++++++++ reference/CPLUSPLUS/SYNTAX/syntax.htm | 60 +++++ reference/CPLUSPLUS/SYNTAX/throw.html | 50 ++++ 20 files changed, 1801 insertions(+) create mode 100644 reference/CPLUSPLUS/SYNTAX/Makefile.am create mode 100644 reference/CPLUSPLUS/SYNTAX/Makefile.in create mode 100644 reference/CPLUSPLUS/SYNTAX/Master.html create mode 100644 reference/CPLUSPLUS/SYNTAX/bool.html create mode 100644 reference/CPLUSPLUS/SYNTAX/class.html create mode 100644 reference/CPLUSPLUS/SYNTAX/comment.html create mode 100644 reference/CPLUSPLUS/SYNTAX/const.html create mode 100644 reference/CPLUSPLUS/SYNTAX/delete.html create mode 100644 reference/CPLUSPLUS/SYNTAX/enum.html create mode 100644 reference/CPLUSPLUS/SYNTAX/friend.html create mode 100644 reference/CPLUSPLUS/SYNTAX/inline.html create mode 100644 reference/CPLUSPLUS/SYNTAX/keywords.html create mode 100644 reference/CPLUSPLUS/SYNTAX/namespace.html create mode 100644 reference/CPLUSPLUS/SYNTAX/new.html create mode 100644 reference/CPLUSPLUS/SYNTAX/operator.html create mode 100644 reference/CPLUSPLUS/SYNTAX/ops.html create mode 100644 reference/CPLUSPLUS/SYNTAX/static.htm create mode 100644 reference/CPLUSPLUS/SYNTAX/struct.html create mode 100644 reference/CPLUSPLUS/SYNTAX/syntax.htm create mode 100644 reference/CPLUSPLUS/SYNTAX/throw.html (limited to 'reference/CPLUSPLUS/SYNTAX') 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 @@ + + + + + + + +
+

+
C++ Syntax
+

+ +
+ +Text goes here. + + +
+

+

+ + + + +
+ Top + + Master Index + + C++ Keywords + + Functions +
+
+

+


+
Martin Leslie +
+

+ + + 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 @@ + + +bool keyword (datatype) + + + + + +


+

+
bool keyword (datatype)
+

+ +
+bool is new to C++. It is not available in all versions +of the compiler as it is a recent addition. + +

+ +The original datatypes fount in C are +here + + +


+

+

+ + + + +
+ Top + + Master Index + + C++ Keywords + + Functions +
+
+

+


+
Martin Leslie +
+

+ + + 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 @@ +CLASS keyword + + + +


+

class keyword

+
+

+The concept of a class +allows you to +encapsulate + a set of related variables and only +allow access to them via predetermined functions. +

+ +The class keyword is used to declare the group of variables +and functions and the visability of the variables and functions. +Here is a basic example. + +

+

+ + + + +
+
+
+    class String 
+    {
+    public:
+  
+        void Set(char *InputStr)   // Declare an Access function
+        { 
+            strcpy(Str, InputStr); 
+        }
+
+    private:
+        
+        char Str[80];      // Declare a hidden variable.
+  
+    };
+
+
+
+

+ +

+ +Now we have declared a class called String we need to +use it. +

+

+ + + + +
+
+
+    main()
+    {
+        String Title;
+        
+        Title.Set("My First Masterpiece.");
+    }
+
+
+
+

+ +This code creates a String +object +called Title and then uses the Set member function +to initialise the value of Str. +

+In C++ the member function Set is also known as a +method +

+This is the strength +of object oriented programming, the ONLY way to change +Str is via the Set method. + +

+ +The final code example brings the last two examples together +ands a new method (called Get) that shows the contents of +Str + +

+

+ + + + +
+
+
+    #include <stdlib.h>
+    #include <iostream.h>               // Instead of stdio.h
+
+    class String 
+    {
+    public:
+  
+        void Set(char *InputStr)   // Declare an Access function
+        { 
+            strcpy(Str, InputStr); 
+        }
+        
+    char *Get(void)                // Declare an Access function
+        { 
+            return(Str); 
+        }
+        
+
+    private:
+        
+        char Str[80];      // Declare a hidden variable.
+  
+    };
+
+    main()
+    {
+        String Title;
+        
+        Title.Set("My First Masterpiece.");
+        
+        cout << Title.Get() << endl;
+    }
+
+
+
+

+ + +


+

Examples:

+ +Example program. +
+

See Also:

+ + +Constructors and destructors. +

+ +Class Inheritance. +


+ +
+ +

C References

+

+ +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +08-Feb-96

+ + 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 @@ + +C++ Comments. + + + +


+
+

C++ Comments.

+
+
+

+C++ allows // as an inline comment, it can be used on any line and is +delimited by the newline character (return). +

+

+ + + + +
+
+
+  main()
+  {
+      int Counter = 0;       // Initalise Counter.
+
+      /* Start the main processing here. */
+  }
+
+
+
+
+

+A handy feature of the new comments is the ability to nest them within the +old style comments. +

+This provides a handy debugging tool. If you write your normal comments +using the // syntax, you can then comment out blocks of code while +debugging with /* */ + + + +


+

C comments

+ +/* ... */ comments +

+ +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+ + +


+ +
Martin Leslie +30-Jan-96
+
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 @@ +const keyword + + + + + + + +
+

const keyword

+
+

+In the C++ world, the use of const is considered to be an +improvement over #define +in general the usual +C programming rules 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. +

+ +


+

Examples:

+o +Example program. +
+

See Also:

+
+ +
+ +

C References

+o +C version of const. +
+o +Theory of constants. +

+ + + 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 @@ +DELETE keyword + + + +


+

DELETE keyword

+
+

+The delete keyword replaces the +free +function in C and will release storage reserved with +new. + +

+

+ + + + +
+
+
+    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;
+
+
+
+

+ +Blocks or arrays of storage can also be freed as shown in the +next example. + +

+

+ + + + +
+
+
+    char *ptr
+    ptr = new char[80];
+    
+    delete [] ptr;          // Free the storage.
+
+
+
+

+ + +


+

Examples:

+o +Example program. +
+

See Also:

+o +new keyword. + +
+ +

C References

+

+o +malloc function. + +

+o +free function. + + +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +17-Feb-96

+ + 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 @@ + + + ENUM keyword + + + + +


+
+

+C++ changes to ENUM. +

+
+ +
+ +

In the C++ world, the rules applying to +enum have been altered. + +

    +
  • Definitions no longer require the enum prefix or a +typedef fudge. +
+
+ + + +
+
+
+    main ()
+    {
+        enum Currancy = {STERLING, DOLLAR, RUPEE};
+                                                                
+        enum Currancy GreenBack = DOLLAR;     // Valid in C and C++
+        Currancy Pounds = STERLING;           // Valid in C++ only.
+
+    }
+
+
+ + + +
    +
  • +An enum is no longer considered to be an int +datatype. Because it has its own datatype you can not perform normal arithmatic +apon enum variables. The following program is now invalid.
  • +
+
+ + + +
+
+
+    main ()
+    {
+        enum Currancy = {STERLING, DOLLAR, RUPEE};
+
+        Currancy Pounds = STERLING;
+
+        Pounds = 2;             // Invalid Statement.
+
+        Pounds++;               // Invalid Statement.
+    }
+
+
+ +

+


+

+Examples:

+o Example +program.   +
+

+See Also:

+ +
+

+C References

+o C +version of enum. + +

+


+
+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +25-Oct-98

+ + + 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 @@ +FRIEND keyword + + + +


+

friend keyword

+
+

+The friend keyword +

+ +


+

See Also:

+
+ +
+ +

C References

+

+ +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +08-Dec-96

+ + 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 @@ +INLINE keyword + + + +


+

INLINE keyword

+
+

+The inline keyword allows C++ programmers to dispence macros created with the +#define preprocessor. +

+ +


+

Examples:

+o +Example program. +
+

See Also:

+
+ +
+ +

C References

+

+o +macros. + +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +17-Feb-96

+ + 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 @@ + + + + + + C++ keywords. + + + +


+
+

+C++ keywords.

+ +
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. +
+ + + + + + + + + +
structstaticconstenum
+ +

+


The following list shows the keywords that have been added to C++. +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
boolcatchclassdeletefriendinline
newnamespaceoperatorprivate protected public 
tempate this throw try template 
+ +

+


The base C keywords are here +
+
+ + + + + + + + + +
TopMaster IndexC++ KeywordsFunctions
+ +

+


+
+Martin Leslie 08-Dec-96
+ + + 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 @@ +NAMESPACE keyword + + +
+

namespace keyword

+
+

+The namespace keyword is a new addition to C++. Not all +compilers support the namespace features. As my compiler +does not support is feature, I am unable to document it at this time :-( +

+ +


+

See Also:

+
+ +
+ +

C References

+

+ +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +08-Aug-97

+ + 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 @@ +NEW operator + + + +


+

NEW operator.

+
+

+The new operator replaces the +malloc +function provided in C to reserve storage taken from the heap. +

+The new operator requires one operand that describes the +type of data to be stored in the memory. Here are some examples. +

+

+ + + + +
+
+
+    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;
+
+
+
+

+ +Blocks or arrays of storage can also be reserved as show in the +next example. + +

+

+ + + + +
+
+
+    char *ptr
+    ptr = new char[80];
+    
+    delete [] ptr;          // Free the storage.
+
+
+
+

+ + + +Although new and +malloc +can be intermixed in the same code, it is probably best +to continue using +malloc +in existing code and new in new code. This is because +you can not use +delete 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. +

+


+

Examples:

+ +Example program. +
+

See Also:

+ +delete keyword. + +
+
+ +

C References

+

+ +malloc function. + +

+ +free function. + + +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +17-Feb-96

+ + 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 @@ +INLINE keyword + + + +


+

operator keyword

+
+

+The operator keyword +

+ +


+

See Also:

+
+ +
+ +

C References

+

+ +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie +08-Dec-96

+ + 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 @@ + +C++ Operators + + + + +


+

C++ Operators

+
+

+The following operators have been introducedor overloaded within C++. +

+

+         ::     Scope. Identifies a global variable.
+         <<     Insertion.
+         >>     Extraction.
+         
+        Apparantly new and delete are operators, not keywords.
+        
+         new Dynamc allocation operator
+         delete Free memory.
+         
+
+ +
+

Examples:

+ +
+

See Also:

+
+ +
+ +

C References

+Base operators offered by C +

+ +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+


+ +
Martin Leslie + +

+ + 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 @@ + + +static keyword + + + + +


+

static keyword

+
+

+The static keyword has been extended in C++ to have the +following meanings. +

+ + + + + + + + + + + + + + + + + + + + +
C++ ContextAction
+A variable outside of a function. + +Variable can be seen by all functions in the file. Default. +
+Variable inside a function. + +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. +
+A class member variable + +Only one copy of the variable exists. All instances of the object +use the same variable (memory location). +
+A class member function (method). + +Function can only access static members of the class +
+

+ +


+Here is the way static works in C +
+

See Also:

+
+ +
+ +

C References

+

+ +


+

+

+ + + + +
+Top + +Master Index + +C++ Keywords + +Functions +
+
+

+ +


+
Martin Leslie +08-Dec-96
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 @@ + + +STRUCT keyword + + + + +
+

+
struct keyword in C++
+

+
+ +

+The struct keyword was introduced in 'C', its original functionality +is documented +here. +

+ +C++ has added two new features to structures. +

    +
  1. The syntax has been improved slightly so you no longer have to + mess around with typedef statements. + +

    +

    + + +
    +

    ANSI C approch to structures.

    +
    +
    +
    +    typedef struct Person {int age; char *name} Person_t;   
    +
    +    struct Person FirstMan;
    +    Person_t      SecondMan;
    +    
    +
    +

    + +

    + + +
    +

    C++ structures.

    +
    +
    +
    +    struct Person {int age; char *name};   
    +
    +    Person FirstMan;
    +    Person SecondMan;
    +    
    +
    +

    +

    + +

  2. 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 + class keyword. +
+

+


+

Examples:

+ +Example program. +

+


+

See Also:

+o +C++ Keywords +
+o +C Keywords +

+ +


+

+

+ + + + +
+ Top + + Master Index + + C++ Keywords + + Functions +
+
+

+


+
Martin Leslie +12 Nov 98

+ + + 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 @@ + + + C++ Syntax + + + +

+ +
+

+C++ Syntax

+ +
o C++ Keywords +
o C +Keywords +
o C++ Comments. +
o C++ Operators. +
o C++ Cast + +

Function Enhancements in C++

+ +
o Function Overloading +
o Default Parameters values. +
o Reference variables. + +

Object Oriented features within C++

+ +
o class statement +
o Constructors and Destructors. +
o Inline methods. +
o Inheritance +
o Friends of classes. +
o Operator Ovrloading. + +

+


+
+ + + + + + + + + +
Top Master Index C++ Keywords Functions 
+ +
+
+Martin Leslie + +
+ + + 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 @@ + + +catch, throw and try keywords. + + + + +
+

+
catch, throw and try keywords.
+

+ +
+ +Text goes here. + +
+

Examples:

+ +A quick example. +
+

See Also:

+
+ + +
+

+

+ + + + +
+ Top + + Master Index + + C++ Keywords + + Functions +
+
+

+


+
Martin Leslie +
+

+ + + -- cgit v1.2.3-54-g00ecf