<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xml:base="http://www.newlc.com" xmlns:dc="http://purl.org/dc/elements/1.1/">
<channel>
 <title>NewLC - Can we use C++ type array in Symbain C++ ? - Comments</title>
 <link>http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c</link>
 <description>Comments for &quot;Can we use C++ type array in Symbain C++ ?&quot;</description>
 <language>en</language>
<item>
 <title>Re: Can we use C++ type array in Symbain C++ ?</title>
 <link>http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c#comment-44811</link>
 <description>&lt;p&gt;If you want the simplicity of plain fixed size arrays and the safety of the bounds checking arrays, use TFixedArray:&lt;/p&gt;

&lt;p&gt;&lt;a href=&quot;http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/FixedSizeArrays/TFixedArrayClass.html&quot;&gt;http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/FixedSizeArrays/TFixedArrayClass.html&lt;/a&gt;&lt;br /&gt;
&lt;a href=&quot;http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/FixedSizeArrays/UsingTFixedArray.guide.html&quot;&gt;http://www.symbian.com/developer/techlib/v70sdocs/doc_source/reference/cpp/FixedSizeArrays/UsingTFixedArray.guide.html&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;However, if you have an unknown or large number of array elements or need dynamic arrays, do as Numpty Alert suggests - use the dynamic arrays.&lt;/p&gt;</description>
 <pubDate>Wed, 27 Feb 2008 23:00:05 +0100</pubDate>
 <dc:creator>Andreas</dc:creator>
 <guid isPermaLink="false">comment 44811 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Can we use C++ type array in Symbain C++ ?</title>
 <link>http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c#comment-44810</link>
 <description>&lt;p&gt;What is the point in doing so when there are existing SYmbian arrays  that are safer to use and will be compatible with the cleanup stack?&lt;/p&gt;</description>
 <pubDate>Wed, 27 Feb 2008 22:01:46 +0100</pubDate>
 <dc:creator>Numpty Alert</dc:creator>
 <guid isPermaLink="false">comment 44810 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Can we use C++ type array in Symbain C++ ?</title>
 <link>http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c#comment-44808</link>
 <description>&lt;p&gt;Instead of defining your own TCleanupItem, you might want to take a look at CleanupArrayDeletePushL function defined in e32base.h:&lt;/p&gt;

&lt;p&gt;&lt;div class=&quot;codeblock&quot;&gt;&lt;code&gt;int* array = new(ELeave) int[10];&lt;br /&gt;CleanupArrayDeletePushL(array);&lt;br /&gt;&lt;br /&gt;// use array&lt;br /&gt;&lt;br /&gt;CleanupStack::PopAndDestroy(); // calls delete [] array&lt;/code&gt;&lt;/div&gt;&lt;/p&gt;

&lt;p&gt;Of course, for an array that is member of a C-class you have to explicitly call array deletion operator when deleting it.&lt;/p&gt;</description>
 <pubDate>Wed, 27 Feb 2008 21:12:43 +0100</pubDate>
 <dc:creator>jari</dc:creator>
 <guid isPermaLink="false">comment 44808 at http://www.newlc.com</guid>
</item>
<item>
 <title>Re: Can we use C++ type array in Symbain C++ ?</title>
 <link>http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c#comment-44716</link>
 <description>&lt;p&gt;Of course you can.&lt;br /&gt;
The only think you have to keep in mind is memory management. In this case, what exactly will you put on CS (probably a TCleanupItem...)&lt;/p&gt;</description>
 <pubDate>Fri, 22 Feb 2008 14:09:08 +0100</pubDate>
 <dc:creator>pirosl</dc:creator>
 <guid isPermaLink="false">comment 44716 at http://www.newlc.com</guid>
</item>
<item>
 <title>Can we use C++ type array in Symbain C++ ?</title>
 <link>http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c</link>
 <description>&lt;p&gt;Hi ,&lt;/p&gt;

&lt;p&gt;Can we deaclare an array of pointer to objcets like this in symbian:&lt;/p&gt;

&lt;p&gt;int i=0;&lt;br /&gt;
anArray[i++]=AClass:NewLC();&lt;/p&gt;

&lt;p&gt;where anArray is declared as :&lt;/p&gt;

&lt;p&gt;AClass* anArray[10];&lt;/p&gt;

&lt;p&gt;&lt;/p&gt;&lt;p&gt;&lt;a href=&quot;http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c&quot;&gt;read more&lt;/a&gt;&lt;/p&gt;</description>
 <comments>http://www.newlc.com/forum/can-we-use-c-type-array-symbain-c#comments</comments>
 <category domain="http://www.newlc.com/forums/symbian-c">Symbian C++</category>
 <pubDate>Fri, 22 Feb 2008 14:07:24 +0100</pubDate>
 <dc:creator>netra</dc:creator>
 <guid isPermaLink="false">20337 at http://www.newlc.com</guid>
</item>
</channel>
</rss>
