You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Trying to compute large factorials and permutation for n-th lexograohic permutation of arrays/strings.
Code segment:
memmove(buffer, digits, length * sizeof(element_t));
for (i = 0; i < length - 1; i++)
{
scale /= (permutation_t)(length - i);
d = index / scale;
index %= scale;
z = to_bigint(0);
if (d > z)
{
bigger_i = to_bigint(i);
c = buffer[d + bigger_i];
memmove(buffer + i + 1, buffer + i, smaller_d * sizeof(element_t));
buffer[i] = c;
}
}
Fails inside c = buffer[] line of code.
Severity Code Description Project File Line Suppression State
Error C2677 binary '[': no global operator found which takes type 'bigint' (or there is no acceptable conversion)
Using Visual Studio C/C++
Trying to compute large factorials and permutation for n-th lexograohic permutation of arrays/strings.
Code segment:
Fails inside c = buffer[] line of code.
Severity Code Description Project File Line Suppression State
Error C2677 binary '[': no global operator found which takes type 'bigint' (or there is no acceptable conversion)
Top of code (compiles fine)
bigint permutation(element_t* const buffer,
const element_t* const digits,
const element_t length,
bigint index)
{
element_t c;
bigint d, z, scale, bigger_i;
element_t smaller_d, i;
...
Please advise.
The text was updated successfully, but these errors were encountered: