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 780175
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:02:07+00:00 2026-05-14T20:02:07+00:00

i have no idea how to get these errors out. i wrote the whole

  • 0

i have no idea how to get these errors out. i wrote the whole code over and tried to see if it was a problem with brackets but that doesnt help either. i dont know what line it is but i believe it is in this function.

error LNK2019: unresolved external symbol “int __cdecl read_file_in_array(int (* const)[3])” (?read_file_in_array@@YAHQAY02H@Z) referenced in function _main
fatal error LNK1120: 1 unresolved externals

i believe this one has to do with brackets

    #include <iostream>
    #include <fstream>
    using namespace std;
    int read_file_in_array(int exam[100][3]);
    double calculate_total(int exam1[], int exam2[], int exam3[]); // function that calcualates grades to see how many 90,80,70,60
    //void display_totals();
    double exam[100][3];

int read_file_in_array(double exam[100][3])
    {
        ifstream infile;  
        int exam1[100];
        int exam2[100];
        int exam3[100];
      infile.open("grades.txt");// file containing numbers in 3 columns
        if(infile.fail()) // checks to see if file opended
            {
            cout << "error" << endl;
            }
        int num, i=0,j=0;
        while(!infile.eof()) // reads file to end of line
          {
              for(i=0;i<100;i++) // array numbers less than 100
              {
                for(j=0;j<3;j++) // while reading get 1st array or element
                infile >> exam[i][j];
                infile >> exam[i][j];
                infile >> exam[i][j];
                cout << exam[i][j] << endl;
                    {
                        if (! (infile >> exam[i][j]) )
                        cout << exam[i][j] << endl;
                    }
              exam[i][j]=exam1[i];
              exam[i][j]=exam2[i];
              exam[i][j]=exam3[i];
              }     
        infile.close();
      }
    return 0;
    }

   double calculate_total(int exam1[],int exam2[],int exam3[])
    {
        int calc_tot,above90=0, above80=0, above70=0, above60=0,i,j, fail=0;
        int exam[100][3];
        calc_tot=read_file_in_array(exam);
        for(i=0;i<100;i++)
            {
                exam1[i]=exam[100][0];
                exam2[i]=exam[100][1];
                exam3[i]=exam[100][2];
                if(exam[i][j] <=90 && exam[i][j] >=100)
                    {
                    above90++;
                        {
                        if(exam[i][j] <=80 && exam[i][j] >=89)
                            {
                            above80++;
                                {
                                if(exam[i][j] <=70 && exam[i][j] >=79)
                                    {
                                    above70++;
                                        {
                                        if(exam[i][j] <=60 && exam[i][j] >=69)
                                            {
                                            above60++;
                                                {
                                                if(exam[i][j] >=59)
                                                    {
                                                    fail++;
                                                }
                                                }
                                        }
                                        }
                                }
                                }
                        }
                        }
                }
        }
        return 0;
    }

    int main()
    {
        int go,go2,go3;
        int exam[100][3];
        int exam1[100];
        int exam2[100];
        int exam3[100];

        go=read_file_in_array(exam);
        go2=calculate_total(exam1,exam2,exam3);
        //go3=display_totals();
        cout << go,go2,go3;
        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-05-14T20:02:08+00:00Added an answer on May 14, 2026 at 8:02 pm

    Your function prototype declares:

    int read_file_in_array(int exam[100][3]);
    

    But the function itself is defined as:

    int read_file_in_array(double exam[100][3])
    

    Make sure you use the same types in both.

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

Sidebar

Related Questions

No related questions found

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.