Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » Community » Newbie corner » [solved]An U++ equivalent of bzero ? (if not a sin) (Can I bzero a flat array of double, or should I use some container template instead?)
Re: An U++ equivalent of bzero ? (if not a sin) [message #52647 is a reply to message #52646] Sun, 03 November 2019 23:08 Go to previous message
Oblivion is currently offline  Oblivion
Messages: 1226
Registered: August 2007
Senior Contributor
Hello Frank,

If you're working with U++ containers, but want to work with dynamic buffers with C-like characteristics, then you can simply use Buffer (ıt is the closest thing to C arrays (with C++ benefits: lets you avoid new/delete, for one. Also it let's you specifiy the initial value.):

Buffer<double> darray(200, 0.0);

for(int i = 0; i < 200; i++)
  Cout() << darray[i] << "\n";


Best regards,
Oblivion


[Updated on: Sun, 03 November 2019 23:12]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: [SOLVED] Empty values to the "EditInt" widget and the "int" basic type
Next Topic: Upp::Vector FindIndex by value of Object
Goto Forum:
  


Current Time: Sun Aug 24 14:18:23 CEST 2025

Total time taken to generate the page: 0.06530 seconds