View Single Post
Old Apr 13th, 2008, 1:58 PM   #5
ShawnStovall
Call me Chuck
 
ShawnStovall's Avatar
 
Join Date: Aug 2007
Location: USA, MI
Posts: 37
Rep Power: 0 ShawnStovall is on a distinguished road
Send a message via AIM to ShawnStovall
Re: Multi-dimensional vectors

Quote:
Originally Posted by Jimbo View Post
Can you post the new code?
Exactly the same as the old except that the declaration of t is now out of the loop.


Here:
C++ Syntax (Toggle Plain Text)
  1. int t = 1;
  2.  
  3. for(int i = 0; i < (num_poly - 1); i++)
  4. for(int j = 1; j >= (num_poly - 1); j += 2)
  5. {
  6. coeff_sqr[i].at(j - t) = coeff[i] * coeff[j];
  7. coeff_ans[i].at(j - t) = coeff[i] * lone[j];
  8. coeff_ans2[i].at(j - t) = lone[i] * coeff[j];
  9. lone_ans[i].at(j - t) = lone[i] * lone[j];
  10. t++;
  11. }
ShawnStovall is offline   Reply With Quote