Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

THIS is in C++. I keep getting this error Illegal instruction when I put in the row and column number. Below I have my code

THIS is in C++.

I keep getting this error "Illegal instruction" when I put in the row and column number. Below I have my code posted. I have been looking at it but cant figure out why it doesnt work

image text in transcribed

#include #include #include void printBord(int [3][3]); bool checkBord(int [3][3],int ,int ,int); using namespace std; int main(){ // Initialize file ifstream ins("gameBoard.txt"); bool win=false;

int *numbers,winCount=0,passCount=0,roundCount=0,num1,num2,choiceNumber,row,col,bord=0;

int Bord[3][3]; for(int i=0;i

while(true) { ins>> num1 >> num2; cout>choiceNumber; if(choiceNumber==num1 || choiceNumber==num2) break; else cout>row>>col; if(row2 || col2) cout main.c howto x starter starterfiles/ ~/workspace/CS262/practice/starterfiles/ $./a.out Round You got numbers 3,3 Choose number(-1 to pass) 3 Enter the row and column number: 12 Invalid row column Enter the row and column number: 10 Illegal instruction main.c howto x starter starterfiles/ ~/workspace/CS262/practice/starterfiles/ $./a.out Round You got numbers 3,3 Choose number(-1 to pass) 3 Enter the row and column number: 12 Invalid row column Enter the row and column number: 10 Illegal instruction

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions