examples/after/example_classes.h
changeset 5 29cf076edbda
parent 0 fe474e3b08fb
--- a/examples/after/example_classes.h	Tue Apr 06 21:24:03 2010 +0100
+++ b/examples/after/example_classes.h	Mon Apr 12 16:01:06 2010 +0100
@@ -23,3 +23,29 @@
 	int iA;
 	int iB;
 	};
+
+
+//Use the keyword "Typename" when using an initialiser that has been Typedef'd inside a class template
+//
+
+template <class T>
+class list {
+	public:
+	typedef unsigned int myType;
+	myType setSize (unsigned int x, unsigned int y);
+	};
+ 
+template<class T>	
+inline  typename list<T>::myType list<T>::setSize (unsigned int x, unsigned int y){  //This line will NOT throw the error
+         return (x*y);
+	};
+
+
+//use \x to specify the character code directly
+
+char* literals()
+   {
+   char* string = "123\x7e456";     // use \x to specify the character code directly
+   return string;
+   }
+