Template Class (No intellisense on functions)

template <class A>
class ClassAdd
{
private:
      A ClassObject; //Store a number
public:
      void SetNum(A COBJ); //Get a number
      A ResultAdd(A COBJ);//add stored plus new number
};
template <class A>
void ClassAdd<A>::SetNum(A COBJ) //Store COBJ
{
      ClassObject = COBJ;
}
template <class A>
A ClassAdd<A>::ResultAdd(A COBJ)//Add COBJ + ClassObject and return it
{
      return ClassObject + COBJ;
}
int main()
{
      ClassAdd<int> Add;
      Add.SetNum(5);
      cout << Add.ResultAdd(3);
      return 0;
}

Okay, say I have something like that.  It works fine, but when I type something like:
Add.
None of the functions appear in the dropdown.  Yet if I remove the function body, it works.

PS: The code runs fine, and I have tried deleting the intellisense files.
LVL 8
List244Asked:
Who is Participating?
 
AlexFMConnect With a Mentor Commented:
Intellisense support in VC++ is restricted and it is possible to write code which is not displayed by Intellisence. There is no solution for this except upgrading VC++ version or using Visual Assist.
0
 
Dariusz DziaraProgrammerCommented:
Sometimes intellisense if off when earlier in code is some error as I have noticed.
0
 
AxterConnect With a Mentor Commented:
I completely agree with AlexFM.

I've been using Visual Assist for many years now, and it's well worth the cost.
You can download a trial version from the following link:
http://www.wholetomato.com/downloads/

For more info, see the main page:
http://www.wholetomato.com/index.html
0
Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

 
List244Author Commented:
So my code is not bugged then?
0
 
AlexFMCommented:
No, if your code is compiled, it is OK. The problem is that C++ compiler is more smart than Intellisence. Your code is OK for compiler, but Intellisence has some problems with it.
0
 
List244Author Commented:
Alright, well I have installed Visual Assist, I will go ahead and give that a try.
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.