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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T19:44:43+00:00 2026-06-15T19:44:43+00:00

I’ve been stumped on my code all day today. I have a number of

  • 0

I’ve been stumped on my code all day today. I have a number of classes to deal with a collection of tracks and albums.
My code compiles and it reads in the file successfully, but as soon as i try to use the istream& operator in my Album Collection class it errors at run time.

This is the error:

   error LNK2001: unresolved external symbol "class std::basic_istream<char,struct    std::char_traits<char> > & __cdecl operator>>(class std::basic_istream<char,struct std::char_traits<char> > &,class AlbumCollection &)" (??5@YAAAV?$basic_istream@DU?$char_traits@D@std@@@std@@AAV01@AAVAlbumCollection@@@Z)1>C:\Users\Shardy\Desktop\AlbumDatabase\Debug\AlbumDatabase.exe : fatal error LNK1120: 1 unresolved externals

I would really appreciate some help. Its become frustrating. None of my books nor google is shedding any light. Thanks for your time.

  • 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-15T19:44:44+00:00Added an answer on June 15, 2026 at 7:44 pm

    Some issues:

    1. main.c: If the file is successfully opened, you state that the file
      was loaded successfully. Why bother opening the file in the first
      place if it is already loaded? Hmm, how can that be?
    2. main.c: You never call any method that reads from the file.
    3. main.c: You can use if (file) instead of if (file.is_open())
    4. main.c: You’re missing a closing } in the if statement.
    5. main.c: You’re not using argc or argv so you can declare main
      as main(void).
    6. You need to post the class declaration (header file) as well as the
      method definitions.
    7. duration.cpp: Your input method will gag when it encounters
      something not numeric or whitespace, such as “:”.
    8. duration.cpp: Your addition operator doesn’t perform time arithmetic
      correctly, especially overflows. Try adding “00:59:35” with
      “00:02:30”.
    9. duration.cpp: Your operator== will return the result of the last
      expression, because you are using the comma, ‘,’ operator. You
      probably want to use the && or logical AND operator.
    10. duration.cpp: Rule of 3: If you define a constructor, copy
      constructor or destruction you should declare all 3 and an
      assignment operator.
    11. duration.cpp: Rule of Math: If you define operator+ or
      operator- you should also implement operators += and -= as
      well. See Boost math library.
    12. duration.cpp: Rule of ordering: If you plan to order or compare,
      you should implement operators <, <=, ==, !=, >, and >=. Hint:
      convert the time into seconds, which should make your life easier
      when comparing. See boost::less_than_comparable.
    13. track.cpp: You’re input method reads the track name first, then
      the duration. The data file shows duration first then track name.
      You also have no code to deal with the field separator between
      duration and column.

      Yep, a debugger would be helpful as well as pencil and paper to go through this code.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a jquery bug and I've been looking for hours now, I can't
I have this code to decode numeric html entities to the UTF8 equivalent character.
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I have a text area in my form which accepts all possible characters from
I have been unable to fix a problem with Java Unicode and encoding. The
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have just tried to save a simple *.rtf file with some websites and

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.