Week 23 contribution of PDK documentation content. See release notes for details. Fixes bugs Bug 2714, Bug 462.
<?xml version="1.0" encoding="utf-8"?>
<!-- Copyright (c) 2007-2010 Nokia Corporation and/or its subsidiary(-ies) All rights reserved. -->
<!-- This component and the accompanying materials are made available under the terms of the License
"Eclipse Public License v1.0" which accompanies this distribution,
and is available at the URL "http://www.eclipse.org/legal/epl-v10.html". -->
<!-- Initial Contributors:
Nokia Corporation - initial contribution.
Contributors:
-->
<!DOCTYPE concept
PUBLIC "-//OASIS//DTD DITA Concept//EN" "concept.dtd">
<concept id="GUID-0EECEF02-EC6A-53D5-8B27-C0732DA0160A" xml:lang="en"><title>How to
replace a C++ array with a wrapper</title><shortdesc>This document shows briefly how to replace a C++ array with a Symbian
platform object.</shortdesc><prolog><metadata><keywords/></metadata></prolog><conbody>
<p>C++ arrays can always be replaced with a <codeph>TFixedArray<class T,TInt
S></codeph>. For example:</p>
<codeblock id="GUID-5DFFA9D5-C18B-5BF9-B3A4-77B7ABB4CD1B" xml:space="preserve">TChar iSeparators[EMaxSeparators];
CCoeControl* iControls[ENumControls];</codeblock>
<p>becomes:</p>
<codeblock id="GUID-388DFDE7-4E2F-5E69-8F12-48A337B1A206" xml:space="preserve">TFixedArray<TChar,EMaxSeparators> iSeparators;
TFixedArray<CCoeControl*,ENumControls> iControls;</codeblock>
<p>The contained class <i>must</i> have a default constructor. The array can
also be initialised from a C++ array (using a bitwise copy).</p>
</conbody></concept>