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

  • SEARCH
  • Home
  • 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 8171045
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:20:06+00:00 2026-06-06T21:20:06+00:00

1>Main.obj : error LNK2019: unresolved external symbol void __cdecl createVideoList(class std::basic_ifstream<char,struct std::char_traits<char> > &,class

  • 0
1>Main.obj : error LNK2019: unresolved external symbol "void __cdecl createVideoList(class                          std::basic_ifstream<char,struct std::char_traits<char> > &,class Video &)" (?createVideoList@@YAXAAV?$basic_ifstream@DU?$char_traits@D@std@@@std@@AAVVideo@@@Z) referenced in function _main
1>c:\users\******\documents\visual studio 2010\Projects\Programming Assignment 4\Debug\Programming Assignment 4.exe : fatal error LNK1120: 1 unresolved externals

I’m working on a Programming Assignment and I’m getting this Link Error 2019 when trying to compile. It references the createVideoList, and these are the lines of my code related to that:

#include <iostream>
#include <fstream>
#include <string>
#include "Video.h"
using namespace std;

void createVideoList(ifstream& infile, Video videoArray);

int main()
{
...
createVideoList(inputfile, videoArray[50]);
}

void createVideoList(ifstream& ifile, Video videoArray[50])
{
string title;
string star1;
string star2;
string producer;
string director;
string productionCo;
int inStock;
int count = 0;
Video newVideo;
getline(ifile, title);
while (ifile)
{
    getline(ifile, star1);
    getline(ifile, star2);
    getline(ifile, producer);
    getline(ifile, director);
    getline(ifile, productionCo);
    ifile >> inStock;
    newVideo.setVideoInfo(title, star1, star2, producer,
        director, productionCo, inStock);
    videoArray[count] = newVideo;
    getline(ifile, title);
}
}

Not sure exactly what code I need to post on here to help you guys out, since I’m not even sure of what the error is saying in the first place. Thanks in advance!

  • 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-06T21:20:08+00:00Added an answer on June 6, 2026 at 9:20 pm
    void createVideoList(ifstream& infile, Video& videoArray);
    

    it should be

    void createVideoList(ifstream& infile, Video* videoArray);
    

    These two are different declarations. In first one, second parameter is reference to Video variable and second one is pointer, which may be an array, what it is in your case.

    Also if you want to pass array as an argument to function, you should call it this way:

    createVideoList(inputfile, videoArray[]);
    

    or

    createVideoList(inputfile, videoArray);
    

    Because when you are doing that:

    createVideoList(inputfile, videoArray[50]);
    

    you are just passing 50-th element of array.

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

Sidebar

Related Questions

1>main.obj : error LNK2019: unresolved external symbol public: __thiscall MyList<class Event>::~MyList<class Event>(void) (??1?$MyList@VEvent@@@@QAE@XZ) referenced
Linking... Directory.obj : error LNK2019: unresolved external symbol public: void __thiscall indexList<class entry,100>::read(class std::basic_istream<char,struct
I'm getting this error when trying to compile: *1>main-light.obj : error LNK2019: unresolved external
It doesn't compile in Visual Studio, it says 1>MSVCRTD.lib(crtexe.obj) : error LNK2019: unresolved external
Does anyone know what this means? 1> Generating Code... 1>BlankWindowDXbaseImpl.obj : error LNK2019: unresolved
getting this 1>main_display.obj : error LNK2005: struct ALLEGRO_DISPLAY * main_display (?main_display@@3PAUALLEGRO_DISPLAY@@A) already defined in
Main Activity: private Button btnSubmit; private DataSource mDataSource; private Context mContext; @Override public void
main() { char a,b,c; a=6; b=-5; c = a+b ; printf (%d %d %d
I'm getting linker errors when using Classes that reference other classes in them. 1>main.obj
#include <cstdlib> template<class A> struct Foo { template<class B> static bool Bar(); }; template<class

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.