0_0_20610685_25908.cpp:6:6: error: 'qu' does not name a type
qu; if(isEnd(t1)) { printf("Preserved\n"); return; } t1.flag=0; qu.push(t1); while(!qu.empty()) { t2=qu.front(); qu.pop(); if(t2.flag==0) { t1.flag=1; rt90(); if(isEnd(t1)) { printf("Rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Rotated through 270 degrees\n"); return; } reflect(); if(isEnd(t1)) { printf("Reflected\n"); return; } qu.push(t1); } else if(t2.flag==1) { rt90(); if(isEnd(t1)) { printf("Reflected and rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Reflected and rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Reflected and rotated through 270 degrees\n"); return; } printf("Improper\n"); } }}int main(){ while(scanf("%d",&n)&&n!=0) { for(i=0;i<n;i++) { scanf("%s%s",t1.map[i],endstate[i]); } BFS(); }}
^
0_0_20610685_25908.cpp:6:13: error: expected unqualified-id before 'if'
qu; if(isEnd(t1)) { printf("Preserved\n"); return; } t1.flag=0; qu.push(t1); while(!qu.empty()) { t2=qu.front(); qu.pop(); if(t2.flag==0) { t1.flag=1; rt90(); if(isEnd(t1)) { printf("Rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Rotated through 270 degrees\n"); return; } reflect(); if(isEnd(t1)) { printf("Reflected\n"); return; } qu.push(t1); } else if(t2.flag==1) { rt90(); if(isEnd(t1)) { printf("Reflected and rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Reflected and rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Reflected and rotated through 270 degrees\n"); return; } printf("Improper\n"); } }}int main(){ while(scanf("%d",&n)&&n!=0) { for(i=0;i<n;i++) { scanf("%s%s",t1.map[i],endstate[i]); } BFS(); }}
^
0_0_20610685_25908.cpp:6:85: error: 't1' does not name a type
qu; if(isEnd(t1)) { printf("Preserved\n"); return; } t1.flag=0; qu.push(t1); while(!qu.empty()) { t2=qu.front(); qu.pop(); if(t2.flag==0) { t1.flag=1; rt90(); if(isEnd(t1)) { printf("Rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Rotated through 270 degrees\n"); return; } reflect(); if(isEnd(t1)) { printf("Reflected\n"); return; } qu.push(t1); } else if(t2.flag==1) { rt90(); if(isEnd(t1)) { printf("Reflected and rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Reflected and rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Reflected and rotated through 270 degrees\n"); return; } printf("Improper\n"); } }}int main(){ while(scanf("%d",&n)&&n!=0) { for(i=0;i<n;i++) { scanf("%s%s",t1.map[i],endstate[i]); } BFS(); }}
^
0_0_20610685_25908.cpp:6:99: error: 'qu' does not name a type
qu; if(isEnd(t1)) { printf("Preserved\n"); return; } t1.flag=0; qu.push(t1); while(!qu.empty()) { t2=qu.front(); qu.pop(); if(t2.flag==0) { t1.flag=1; rt90(); if(isEnd(t1)) { printf("Rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Rotated through 270 degrees\n"); return; } reflect(); if(isEnd(t1)) { printf("Reflected\n"); return; } qu.push(t1); } else if(t2.flag==1) { rt90(); if(isEnd(t1)) { printf("Reflected and rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Reflected and rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Reflected and rotated through 270 degrees\n"); return; } printf("Improper\n"); } }}int main(){ while(scanf("%d",&n)&&n!=0) { for(i=0;i<n;i++) { scanf("%s%s",t1.map[i],endstate[i]); } BFS(); }}
^
0_0_20610685_25908.cpp:6:115: error: expected unqualified-id before 'while'
qu; if(isEnd(t1)) { printf("Preserved\n"); return; } t1.flag=0; qu.push(t1); while(!qu.empty()) { t2=qu.front(); qu.pop(); if(t2.flag==0) { t1.flag=1; rt90(); if(isEnd(t1)) { printf("Rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Rotated through 270 degrees\n"); return; } reflect(); if(isEnd(t1)) { printf("Reflected\n"); return; } qu.push(t1); } else if(t2.flag==1) { rt90(); if(isEnd(t1)) { printf("Reflected and rotated through 90 degrees\n"); return; } rt180(); if(isEnd(t1)) { printf("Reflected and rotated through 180 degrees\n"); return; } rt270(); if(isEnd(t1)) { printf("Reflected and rotated through 270 degrees\n"); return; } printf("Improper\n"); } }}int main(){ while(scanf("%d",&n)&&n!=0) { for(i=0;i<n;i++) { scanf("%s%s",t1.map[i],endstate[i]); } BFS(); }}
^
|