problem using templates

Please support our C++ advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Feb 2008
Posts: 6
Reputation: Swati_bansal is an unknown quantity at this point 
Solved Threads: 0
Swati_bansal Swati_bansal is offline Offline
Newbie Poster

problem using templates

 
0
  #1
Feb 21st, 2008
When I try accesing private members of a class using friend functions after including the concept of templates in visual basic c++, the compiler shows me an error message that friend functions cannot access the private members declared in class.

Please help.....
Last edited by Ancient Dragon; Feb 21st, 2008 at 11:08 am. Reason: remvoed code tags. You only use them around code, not text
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 1,089
Reputation: vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all vijayan121 is a name known to all 
Solved Threads: 164
vijayan121 vijayan121 is offline Offline
Veteran Poster

Re: problem using templates

 
0
  #2
Feb 21st, 2008
Reply With Quote Quick reply to this message  
Join Date: Aug 2005
Posts: 15,655
Reputation: Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute Ancient Dragon has a reputation beyond repute 
Solved Threads: 1500
Team Colleague
Featured Poster
Ancient Dragon's Avatar
Ancient Dragon Ancient Dragon is offline Offline
Still Learning

Re: problem using templates

 
0
  #3
Feb 21st, 2008
>>visual basic c++
There is no such thing

Friend Functions
Don't PM me with questions -- you might get a nasty PM in response. If you have a question then post it in one of the forums.
Reply With Quote Quick reply to this message  
Join Date: Apr 2004
Posts: 4,461
Reputation: Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future Dave Sinkula has a brilliant future 
Solved Threads: 254
Team Colleague
Dave Sinkula's Avatar
Dave Sinkula Dave Sinkula is offline Offline
long time no c

Re: problem using templates

 
0
  #4
Feb 21st, 2008
"One of the methods used by statists to destroy capitalism consists in establishing controls that tie a given industry hand and foot, making it unable to solve its problems, then declaring that freedom has failed and stronger controls are necessary." --Ayn Rand
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 51
Reputation: farag is an unknown quantity at this point 
Solved Threads: 1
farag farag is offline Offline
Junior Poster in Training

Re: problem using templates

 
0
  #5
Feb 21st, 2008
i think that you mean c++ on visual studio

what ever i think that if i see the code will be better

anyway frien function declaration will be included in the class and the definition will be outside the class
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the C++ Forum


Views: 418 | Replies: 4
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC