Symbian Developer Library

SYMBIAN OS V6.1 EXAMPLE CODE

[Index] [Previous] [Next]



C Standard Library example code

These examples all use code written in C, and therefore link against the C Standard Library.

Some of the code used in the ConsoleApp example has been copied from the FreeBSD source code (see http://www.freebsd.org/).


Hello — Hello world

Found in: epoc32ex\stdlib\Hello


Description

Hello is the most basic example demonstrating how to use the C Standard Library.

The main point to note is the .mmp project specification file, which specifies the epoc32\include\libc\ include directory and links against estlib.lib, the C Standard Library, and the static library ecrt0.lib.

[Top]


ConsoleApp — simple console program

Found in: epoc32ex\stdlib\ConsoleApp


Description

This is a simple console-based C Standard Library program. It converts quantities from one unit of measurement into another. The user is prompted for input. Conversion information is provided by the file slunits.dat.


Usage

Enter the type of unit you want to convert from, and then the type of unit you want to convert to. For example, to convert from inches to centimetres, enter "in", then "cm". The program replies with the ratio of inches to centimetres, and of centimetres to inches.