ok, correct.............

"Victor A. Wagner Jr." <[EMAIL PROTECTED]> wrote:          At 10:33 2007-02-04, 
Robert Ryan wrote:
  what would make it look better.
you mean correct?


  "Victor A. Wagner Jr." <[EMAIL PROTECTED]> wrote: 
    
   At 18:48 2007-02-03, Robert Ryan wrote:
    
   int array_one[ 25 ];
  
   > > int *array_two = new int[ 25 ];
  
   
   
   if you wanted to total up the ints, how would you do it. 
  
   for(int i=0; i<array_one; i++) {
  
   total += array_one [i]; 
  
   and then cout << "The total Is:  " <<;  }
  
   no, not even close

  
   what is  "i<array_one" supposed to do?

#include <iostream>
#include <numeric>
using namespace std;

int main()
{
        int array_one[25];
        /* some code to put stuff in array_one */
        int total = accumulate(array_one, array_one+25, 0);
        cout << "The total is: " << total << endl;
}


[deleted]

  Victor A. Wagner Jr.      http://rudbek.com
The five most dangerous words in the English language:
              "There oughta be a law" 

         

 
---------------------------------
Everyone is raving about the all-new Yahoo! Mail beta.

Reply via email to