View Single Post
Old Apr 15th, 2008, 11:16 PM   #2
mbd
Programmer
 
Join Date: Nov 2007
Posts: 86
Rep Power: 1 mbd is on a distinguished road
Re: Init array with a non-zero value

c++ Syntax (Toggle Plain Text)
  1. #include <algorithm>
  2.  
  3. ...
  4.  
  5. int variable[10];
  6. std::fill_n(variable, 10, 9);

still just a loop under the hood
mbd is offline   Reply With Quote