#includevoid CreateCharBuffer() { TBuf<16> buffer; buffer.Append('H'); buffer.Append('e'); buffer.Append('l'); buffer.Append('l'); buffer.Append('o'); buffer.Append(' '); buffer.Append('W'); buffer.Append('o'); buffer.Append('r'); buffer.Append('l'); buffer.Append('d'); buffer.Append('!'); // Print the buffer RDebug::Print(_L("%S"), &buffer); }
#includeIn this example, we create an integer buffer of size 10 using TBuf. We then use the `AppendNum()` method to append the integer value 42 to the buffer. Finally, we print the buffer using the `RDebug::Print()` method. Package Library: The TBuf class is a part of the Symbian Operating System library, specifically the E32Std.lib library.void CreateIntBuffer() { TBuf<10> buffer; TInt num = 42; buffer.AppendNum(num); // Print the buffer RDebug::Print(_L("%S"), &buffer); }