Leon Anavi
IT Tips && Tricks

Mobile & Embedded

Created: 30.01.2010 19:12 Last Modified: 30.01.2010 19:19 Views: 4106
Keywords: array, iterator, TFixedArray

Fixed Arrays in Symbian C++

Class TFixedArray presents arrays with fixed size in Symbian C++. Its usage is much like the usage of a standard C array. Operator [ ] is overridden so elements can be accessed directly. Important methods of the class are:
  • At() gets a reference to the specified element.
  • Begin() gets a reference to the first element of the array.
  • End() gets a reference to the end of the array.
  • Count() gets the size of the array.
  • Length() gets the size of the array element in bytes.
  • DeleteAll() deletes all elements
  • Copy() copies elements to the array.
Full list of supported methods and details are available at the class reference links.

Example

TFixedArray myArray;	 
for (TInt nIter = 0; nIter < 10; nIter++)
{
	myArray[nIter] = nIter*2;
	console->Printf(_L("%d "), myArray[nIter]);
}

Class Reference

TFixedArray in Base E32_EKA2


  Home | About | Contact | Disclaimer | Sitemap 2009-2016 Leon Anavi. All rights reserved.