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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T13:35:46+00:00 2026-06-10T13:35:46+00:00

Not really a huge issue, but I’m wondering if IntelliSense is messed up when

  • 0

Not really a huge issue, but I’m wondering if IntelliSense is messed up when it comes to friend functions in classes?

I have a class that uses the overloaded operators for ostream and istream (<<, >>), and I have them flagged as friend functions inside my class. So theoretically they should have access to the class’s private members. The program compiles and runs fine, no errors – but as I’m continuing to write code, IntelliSense is constantly reporting that the member functions are inaccessible to the functions. It still compiles, but I’m wondering if this is a problem with IntelliSense or something on my end and I just happen to be getting lucky that’s it’s running at all?

    friend std::ostream & operator <<(std::ostream &, const Rational &);
    friend std::istream & operator >>(std::istream &, Rational &);

    std::ostream & operator <<(std::ostream & outs, const Rational & source)
    {
        outs << source.itsNum << '/' << source.itsDen;
        return outs;
    }

    std::istream & operator >>(std::istream & ins, Rational & target)
    {
        ins >> target.itsNum >> target.itsDen;
        return ins;
    }
  • 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-10T13:35:47+00:00Added an answer on June 10, 2026 at 1:35 pm

    There is nothing wrong with your code. My bet would be that IntelliSense messes up. Try deleting the IntelliSense database for your project to see if the error will go away (the IntelliSense database will rebuild itself after restart of the Visual Studio). The database should be located alongside your .sln file and (at least for Visual Studio 2008) has the extension .ncb.

    Other than that, some additional info. The IntelliSense feature for VisualStudio AFAIK is actually developed by a different company than Microsoft, so the compiler and IntelliSense may sometimes have different opinions on what is correct and what is not. Just saying. 🙂

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

Sidebar

Related Questions

I'm not really sure how to ask this question, but I'll do my best.
I have a really huge numberrange to check against lots of regular expressions. In
I have a project that's not really big. With Visual Studio's C++ compiler the
Not really too sure how to word this question, therefore if you don't particularly
Not really a coding question more a little help with my idea of a
Not really sure how to phrase this other than by example.. Given... DATABASES =
I not really sure how to describe correctly my problem. My layout contains a
Its not really a subtraction I'm looking for. And I know its not a
I'm not really sure how to even ask the question, let alone find an
I know your not really supposed to use Flash and SWF's in a Sencha

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.