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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T10:24:31+00:00 2026-06-07T10:24:31+00:00

I read a half-dozen forum threads relating to this error and most were due

  • 0

I read a half-dozen forum threads relating to this error and most were due to a string declaration and the rest were not relevant to this issue.

This error is in a program that takes on input string, compares it to a list of strings then returns the strings that are close matches. That simple explanation is the gist, the actual implementation is has a bit more to it.

In a test implementation that compiled and works, I used this line of code

Set<Lexicon::CorrectionT> matches = lex.suggestCorrections(line, maxDistance);

Set is a class (uses a bst class) I am reusing from a CS106B course and Lexicon is another class from the course that I wrote and am now reusing for an unrelated project. The function suggestCorrections takes a string line and an edit distance to then compare the string and returns a Set of suggestions.

I revised the line to this

matchSet.corrections = lex.suggestCorrections(matchSet);

by defining a CorrectionT corrections within a Lexicon::MatchesT matchSet and defining matchSet in a preceding function and then passing it as a reference. MatchesT contains the fields for line and maxDistance.

From my knowledge these two lines of code are identical with the exception of the approach I am using.

So, why do I get this error “error C2679: binary ‘=’ : no operator found which takes a right-hand operand of type ‘Set'”

  • 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-07T10:24:33+00:00Added an answer on June 7, 2026 at 10:24 am

    From my knowledge these two lines of code are identical with the exception of approach I am using.

    Nope, they are completely different; one instantiates a new object, calling the copy constructor of Set<Lexicon::CorrectionT>; the other copies the object on the right to the (already created) object on the left, calling the assignment operator, which, for some reason, isn’t available.

    Has it been implemented in Set<>? What type is matchSet.corrections and what return type has suggestCorrections?

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

Sidebar

Related Questions

I have read this and this , and this , and half a dozen
Read on before you say this is a duplicate, it's not. (as far as
I've read the papers linked to in this question . I half get it.
I read this comment here: Passing a String by Reference in Java? Yes, it's
I'm a single developer with half a dozen reasonably popular projects - most of
I read that the following class is not thread safe since threads could read
I have a desktop app that has 65 modules, about half of which read
Read about the issue in this stackoverflow question . Still have the same issue
I read this question in stackoverflow. The excerpt answer provided by bbum is below:
This is a followup question to the question: I am attempting to read a

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.