Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 Minor Bug: friend function declaration ignored
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Mordachai
Tomato Guru

USA
224 Posts

Posted - Mar 26 2013 :  12:26:55 PM  Show Profile  Reply with Quote
Warning: untested-code example (should get the idea across, at least)
class A
{
 ... // details omitted
private:
 int m_count;
 friend void B::AdjustA(int);
};

class B
{
 ... // details omitted
 void AdjustA(int i)
 {
   m_pA->m_count += i;
 }
private:
 A * m_pA;
};

B::AdjustA will show m_count as underlined in squiggly-red, with a tooltip from VAX saying "Error: member A::m_count (declared at line ...) is inaccessible"

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Mar 26 2013 :  5:03:15 PM  Show Profile  Reply with Quote
This is done by the IDE, not Visual Assist. The IDE underlines errors from VS2010 and up.

Tools -> Options... -> Text Editor -> C/C++ -> Disable Squiggles
Go to Top of Page

Mordachai
Tomato Guru

USA
224 Posts

Posted - Mar 27 2013 :  08:27:31 AM  Show Profile  Reply with Quote
D'oh! My bad :O
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19187 Posts

Posted - Mar 27 2013 :  2:20:25 PM  Show Profile  Reply with Quote
A very easy mistake to make, its sometimes hard to know where the IDE stops and VA starts

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000