Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
9 Views

auto size_t array initialization

Hi,

[cpp]void f()
{
  size_t keys[32];
  for (size_t s=0; s<32; ++s)
  {
     keys  = s;
  }[/cpp]
Is this the fastest way to initialize the small keys arrays to hold consecutive size_t values?
regards,
0 Kudos
1 Reply
Highlighted
9 Views


[cpp]void f()
{
  size_t keys[32] = { 0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,21,23,24,25,26,27,28,29,30,31};



should be faster
Jim Dempsey












[/cpp]
0 Kudos