Code doesn't work need help fixing it in C It s
Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
Related questions
Question
Code doesn't work need help fixing it in C
It says
"undefined reference to 'getMoveCol'
error; 1d returned 1 exit status
Build failed: 2 error (s)
![BUG: RUN
un and Debug
e Run and Debug, open
create a launch.json
matic debug
about launch.json,
g C/C++ debugging.
Get Started
C hello.c
Users > garettblake > C othello4.c>
24
char playerName [NAME];
25
int playerNum;
26
int discCount;
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
! 42 43 :
O Search
};
44 {
45
C othello4.c X
playGame()
// Player name
// Player number
// Number of discs
// function prototypes
void welcomeScreen ();
void displayExplicitBoard();
void clearScreen();
ello 4 - bl...
void playGame();
void initializeBoard (char board [ROW] [COL]);
void displayBoard (char board [ROW] [COL]);
void makeMove( struct Player* player, char board [ROW] [COL]);
int isValid (char move [3], char board [ROW] [COL] );
int getMoveRow (char move [3]);
int getMoveCol (char move [3]);
int isOpen (char move [3], char board [8] [8]);
void displayStats (struct Player player);
// main function
int
main()
// call function welcomeScreen
V
[](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb4df6a78-f718-4249-b83d-88d7d41f64bc%2F0179027f-44f9-4a52-ab01-64fdbfb8c51f%2Ffuzxe1x_processed.jpeg&w=3840&q=75)
Transcribed Image Text:BUG: RUN
un and Debug
e Run and Debug, open
create a launch.json
matic debug
about launch.json,
g C/C++ debugging.
Get Started
C hello.c
Users > garettblake > C othello4.c>
24
char playerName [NAME];
25
int playerNum;
26
int discCount;
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
! 42 43 :
O Search
};
44 {
45
C othello4.c X
playGame()
// Player name
// Player number
// Number of discs
// function prototypes
void welcomeScreen ();
void displayExplicitBoard();
void clearScreen();
ello 4 - bl...
void playGame();
void initializeBoard (char board [ROW] [COL]);
void displayBoard (char board [ROW] [COL]);
void makeMove( struct Player* player, char board [ROW] [COL]);
int isValid (char move [3], char board [ROW] [COL] );
int getMoveRow (char move [3]);
int getMoveCol (char move [3]);
int isOpen (char move [3], char board [8] [8]);
void displayStats (struct Player player);
// main function
int
main()
// call function welcomeScreen
V
[
![and Debug
n and Debug, open
te a launch.json
c debug
ut launch.json,
C++ debugging.
Get Started
C hello.c
C othello4.c X
Users > garettblake > C othello4.c>
playGame()
223 int isopen(char move [3], char board [8] [8])
224
{
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
}
int open = 0;
int rowInt = getMoveRow (move);
int colInt = getMoveCol(move);
if(rowInt==1 && colInt == 1 && board [rowInt] [colIn
open = 1;
return open;
}
int getMoveRow (char move [3]) {
int index;
int row;
row = move [1] - '0';
index = row - 1;
if (row < 1 && row > 8) {
index = row-1;
>
}
return index;](/v2/_next/image?url=https%3A%2F%2Fcontent.bartleby.com%2Fqna-images%2Fquestion%2Fb4df6a78-f718-4249-b83d-88d7d41f64bc%2F0179027f-44f9-4a52-ab01-64fdbfb8c51f%2F1vjm6sk_processed.jpeg&w=3840&q=75)
Transcribed Image Text:and Debug
n and Debug, open
te a launch.json
c debug
ut launch.json,
C++ debugging.
Get Started
C hello.c
C othello4.c X
Users > garettblake > C othello4.c>
playGame()
223 int isopen(char move [3], char board [8] [8])
224
{
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
}
int open = 0;
int rowInt = getMoveRow (move);
int colInt = getMoveCol(move);
if(rowInt==1 && colInt == 1 && board [rowInt] [colIn
open = 1;
return open;
}
int getMoveRow (char move [3]) {
int index;
int row;
row = move [1] - '0';
index = row - 1;
if (row < 1 && row > 8) {
index = row-1;
>
}
return index;
Expert Solution
![](/static/compass_v2/shared-icons/check-mark.png)
Step 1
The compiler saying "getMoveCol is not defined" because you didn't write the function properly or you didn't used the correct parameter. Since you didn't attached the whole code, I can not say what is the exact mistake you are making.
Step by step
Solved in 2 steps
![Blurred answer](/static/compass_v2/solution-images/blurred-answer.jpg)
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Recommended textbooks for you
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![Database System Concepts](https://www.bartleby.com/isbn_cover_images/9780078022159/9780078022159_smallCoverImage.jpg)
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
![Starting Out with Python (4th Edition)](https://www.bartleby.com/isbn_cover_images/9780134444321/9780134444321_smallCoverImage.gif)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
![Digital Fundamentals (11th Edition)](https://www.bartleby.com/isbn_cover_images/9780132737968/9780132737968_smallCoverImage.gif)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
![C How to Program (8th Edition)](https://www.bartleby.com/isbn_cover_images/9780133976892/9780133976892_smallCoverImage.gif)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
![Database Systems: Design, Implementation, & Manag…](https://www.bartleby.com/isbn_cover_images/9781337627900/9781337627900_smallCoverImage.gif)
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
![Programmable Logic Controllers](https://www.bartleby.com/isbn_cover_images/9780073373843/9780073373843_smallCoverImage.gif)
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education