Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int main()
- {
- bool integer[8]= {0, 0, 0, 0, 0, 0, 0, 0};
- for (int index = 0; index < 8; ++index){ // for (int index = 0; index < 65; ++index){
- cout << integer[index] << endl; //no overflow
- if (integer[0] == integer[0]){
- if (integer[index + 1] == integer[index - 1]){
- cout << "STOP"; //overflow, going before the index
- }
- }
- if (integer[index + 2] == integer[index - 2]){
- cout << "STOP CODE"; //overflow, going before the index
- if (integer[index + 3] == integer[index - 3]){
- cout << "STOP HERE"; //overflow, going before the index
- }
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement