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
 operator autocomplete
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Sep 30 2005 :  03:41:03 AM  Show Profile
I remember VA always has problems with autocompleteing operators. In fact, for a long time, it wasn't supported at all.

Currently, when I use CString, I see operator LPCTSTR in list, but it gets autocompleted into:

operator operatorLPCTSTR()

feline
Whole Tomato Software

United Kingdom
18942 Posts

Posted - Oct 01 2005 :  3:24:36 PM  Show Profile
what CString class are you using? in VS 2003, C++ if i add the code:

CString strName = "feline";

to a file no LPCTSTR operator is listed for the CString class. the IDE's help is taking me to CStringT, and this operator is not listed.

at a wild guess this sounds like a cast operator, and if so, now would VA be able to suggest it? i am expecting you to end up with:

(LPCTSTR)strName;

zen is the art of being at one with the two'ness
Go to Top of Page

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Oct 06 2005 :  02:48:35 AM  Show Profile
Currently I use CString found in VS6SP5.

operator operatorLPCTSTR() is pasted *always*, but with small correction - it is also listed like that in autocomplete popup window.
Go to Top of Page

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Oct 06 2005 :  03:00:58 AM  Show Profile
Currently I use CString found in VS6SP5.

operator operatorLPCTSTR() is pasted *always*, but with small correction - it is also listed like that in autocomplete popup window.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18942 Posts

Posted - Oct 06 2005 :  6:28:52 PM  Show Profile
using VC6 CString i have the function:

_AFX_INLINE CString::operator LPCTSTR() const
{ return m_pchData; }

defined in "c:\\Program Files\\Microsoft Visual Studio\\VC98\\MFC\\Include\\AFX.INL"

isn't this a cast operator? certainly i am not getting this suggested with the code:

CString strName("Feline");
strName.|

can you post a few lines of code to show me what you are doing?

zen is the art of being at one with the two'ness
Go to Top of Page

gmit
Whole Tomato Software

Croatia
90 Posts

Posted - Oct 07 2005 :  02:55:49 AM  Show Profile
Bwah... Terminology...

Yes, a cast operator, but, in C++ you are allowed to use them as function call, if you like - and I like that sometimes, to be more explicit in the code.

OK, I write exactly what you've wrote and autocomplete popup appears. If I scroll, at the letter 'o', I get that

operator operatorLPCTSTR()

. I can snapshot if you don't believe. ;) Currently, VS6SP6, VA1424, unicode project, but I remember getting that in VS8beta2 as well...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18942 Posts

Posted - Oct 07 2005 :  5:50:31 PM  Show Profile
for what ever reason i never call an overloaded operator directly like that in my C++ code. so i am vaguely aware you can do it, but without hunting up a reference book i would not know how to do it. hence the questions.

it turns out to be slightly more subtle than this. for me with this code jumping to the items starting with O i do not see "operator operatorLPCTSTR" because the listbox is not wide enough. i only get that with the code:

strName.op|

however i now see the same thing you are seeing

case=818

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