问题遇到的现象和发生背景
遇到的现象和发生背景,请写出第一个错误信息
[Error] no match for 'operator%' (operand types are 'std::bitset<15ull>' and 'int')
用代码块功能插入代码,请勿粘贴截图。 不用代码块回答率下降 50%
#include<bitset>
#include<cstdio>
using namespace std;
int main(){
//data:
int Chinese_and_English=0;
int Enter = 1;
int one=0;
//---------------------------------
printf("Please enter a numbers(0 = Chinese,Greater than 1 = English):");
scanf("%d\n",&Chinese_and_English);
if(Chinese_and_English==1){
do{
if(Enter>32678||Enter<0){
printf("Input error!Please re-enter.\n");
}
printf("Please enter a range of numbers (A number from 0 to 32768 and to the power of 2):");
scanf("%d\n",&Enter);
}
while(0==(Enter==1||Enter==2||Enter==4||Enter==8||Enter==16||Enter==32||Enter==64||Enter==128||Enter==256||Enter==512||Enter==1024||Enter==2048||Enter==4096||Enter==8192||Enter==16384||Enter==32678));
bool The_number_on_the_ith_digit_is_1[Enter*15];
int number[Enter]={};
int j;
for(j=0;j<=15;j++){
for(int i=0;i<Enter;i++){
The_number_on_the_ith_digit_is_1[(i+1+j*Enter)*(j+1)]=int(((((((((((((((bitset<15>(i+1)%10)%10)%10)%10)%10)%10)%10)%10)%10)%10)%10)%10)%10)%10)%10);
}
}
for(int n=0;n<Enter;n++){
one+=The_number_on_the_ith_digit_is_1[n];
}
int Sequence_of_numbers[one*15];
int m=1;
for(int c=0;c<15*one;c++){
Sequence_of_numbers[c]=The_number_on_the_ith_digit_is_1[m*0+c]*1+The_number_on_the_ith_digit_is_1[m*1+c]*2+The_number_on_the_ith_digit_is_1[m*2+c]*4+The_number_on_the_ith_digit_is_1[m*3+c]*8+The_number_on_the_ith_digit_is_1[m*4+c]*16+The_number_on_the_ith_digit_is_1[m*5+c]*32+The_number_on_the_ith_digit_is_1[m*6+c]*64+The_number_on_the_ith_digit_is_1[m*7+c]*128+The_number_on_the_ith_digit_is_1[m*8+c]*256+The_number_on_the_ith_digit_is_1[m*9+c]*512+The_number_on_the_ith_digit_is_1[m*10+c]*1024+The_number_on_the_ith_digit_is_1[m*11+c]*2048+The_number_on_the_ith_digit_is_1[m*12+c]*4096+The_number_on_the_ith_digit_is_1[m*13+c]*8192+The_number_on_the_ith_digit_is_1[m*14+c]*16384+The_number_on_the_ith_digit_is_1[m*15+c]*32678;
}
printf("Is there any number you want in the numbers below?\n");
for(int a=0;a<one;a++){
printf("%d ",Sequence_of_numbers[a]);
}
}
else{
}
return 0;
}
###### 运行结果及详细报错内容
没有
我的解答思路和尝试过的方法,不写自己思路的,回答率下降-60%
在网上冲浪了好久很久很久以前