Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9192843
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T21:01:33+00:00 2026-06-17T21:01:33+00:00

I started studying computer science a few months ago so this question may be

  • 0

I started studying computer science a few months ago so this question may be a bit stupid, but I’d appreciate if someone could help me.
So my teacher asked us to make our version of a game called Bejeweled, I think I did ok so far but I started having this problem where I get the following error message : [Linker error] undefined reference to `change_position’. For some reason the function change_position isn’t letting my code compile, and I really can’t understand why. In the following code the function has a “//” on the main function and it works fine, but without the // it gets that message. Can anyone explain me how to make it work? It would be even better if someone explained why it isn’t working too. Thanks a lot and sorry for any english mistake.
Thanks a lot, I fixed the mistake I was making and now it works properly. You guys are awesome.

#include <stdio.h>
#include <stdlib.h>
#include <time.h>
void create_matrix (int matriz[8][8], int i, int j)
{
srand (time (NULL));
for (i=0;i<8;i++)
{
for (j=0;j<8;j++)
{
matriz[i][j]=rand()%7+1;
}
}
}
//___________________________________________________
void check_matrix(int matriz[8][8], int i, int j)
{
     for (i=0;i<8;i++)
         {
             for (j=0;j<8;j++)
           {    
               while (matriz[i][j] == matriz[i+1][j] && matriz[i+1][j] == matriz [i+2][j] || matriz [i][j] == matriz [i][j+1] && matriz [i][j+2])
               {
               matriz[i][j]=rand()%7+1;
               }
           }
     }
}
//___________________________________________________
void print_matrix (int matriz[8][8], int i, int j)
{
for (i = 0; i < 8 ; i++)
{
for (j=0;j<8;j++)
{
printf("%d ", matriz[i][j]);
}
printf ("\n");
}
}
//___________________________________________________
void change_position(int matriz[8][8], int i, int j)
{
printf ("Select the line. ");
scanf ("%d", &i);
printf ("Select the column. ");
scanf ("%d", &j);
}
//___________________________________________________
int main()
{
int matriz[8][8], i=0, j=0;
create_matrix (matriz, i, j);
check_matrix (matriz, i, j);
print_matrix (matriz, i, j);
change_position (matriz, i, j);
printf ("\n");
system ("pause");
return 0;
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T21:01:34+00:00Added an answer on June 17, 2026 at 9:01 pm

    Looks like print_matrix just above change_position is missing one more closing brace

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sorry if this question is too simple or easy. I just started studying Delegates
This is a bit of a tricky scenario. I've been studying blocks and started
I just started studying Python two days ago, so my code is sloppy...But I'm
I just started studying programming about 6 months ago and I have really been
i started studying java about 2 or 3 months ago and i am fairly
I know it sounds stupid but I recently started studying fragments/fragmentactivity to replace tabactivity..
Sorry if this question was asked already. I started studying C# and noticed that
Started with this question: OpenID. How do you logout OK. So OpenID does not
So I have just started studying processing at university, but unfortunately missed the firth
I have started to learn ASP.NET MVC, and at this time of studying I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.