HelloWorld
: writes "Hello World!" to
the consoleHelloWorld
is a very simple piece of code showing how
text is written to the console. All other examples in Basics
and
System
use the same technique.
The file CommonFramework.h
contains the entry point
and all code necessary to support the example itself, including the
construction of the console and the cleanup stack. Putting code into a
.h
file may not be conventional practice, but it is useful to do
so here.
The example shows the use of the _LIT
macro which is
used throughout all of the examples. The macro generates a:
const static TLitC<TInt>
object and is an efficient and convenient way of generating constant literal text.
As this is a wide (Unicode) build, TLItC<TInt>
is a typedef for TLitC16<TInt>.