Will this code create an array like this: 1,2,3,4,5,6,7,8,9,10?
I couldn't be bothered to search for something similar or to read the FAQ.int i_array[10];
for(int i=0; i<=10; i++)
{
i_array[i] = i;
}
Will this code create an array like this: 1,2,3,4,5,6,7,8,9,10?
I couldn't be bothered to search for something similar or to read the FAQ.int i_array[10];
for(int i=0; i<=10; i++)
{
i_array[i] = i;
}
Last edited by Zewu; 05-25-2002 at 09:51 AM.
Are you a troll?
Don't do that. You declare 10 cells but loop thu 11!for(int i=0; i<=10; i++)
Try this:
for(int i=0; i < 10; i++)
i_array[i] = i+1;
...but yeah, you were close...
Code:#include <cmath> #include <complex> bool euler_flip(bool value) { return std::pow ( std::complex<float>(std::exp(1.0)), std::complex<float>(0, 1) * std::complex<float>(std::atan(1.0) *(1 << (value + 2))) ).real() < 0; }
The good thing about questions is that they are never stupid. It's people that...
Regards,
Mario Figueiredo
Using Borland C++ Builder 5
Read the Tao of Programming
This advise was brought to you by the Comitee for a Service Packless World