Google Community Chat
 
overloading operators

You're visiting Google Community as a guest.
In order to post, you'll need to register and log in.


(If you were registered and logged in, these advertisements wouldn't be here)
Post new topic   Reply to topic    Google Community Forum Index // Web Design, Coding & Programming Forum
   
Author Message
Christopholofigus
Noogle
Noogle


Joined: 24 Nov 2005
Location: South Eastern Washington
709.15 GC$

Items

PostPosted: Sat Dec 03, 2005 1:50 am    Post subject: overloading operators Reply with quote

anyone know how to overload the [] operator in C++? (im using MS Visual Studio . Net for my compiler)
_________________
Back to top
View user's profile Send private message Google Talk
killerpants
Noogle
Noogle


Joined: 24 Jul 2005

730.00 GC$

Items

PostPosted: Sun Jan 15, 2006 9:15 pm    Post subject: i think it's just like a normal operator Reply with quote
I'm pretty sure you just overload it the same way you overload a plus sign. I'd assume it would have to be a non-static member function (and it would probably have a return type Very Happy) :

Code:
objectType& operator[](int whatever) throw (char whatever);


or something along that line.
Back to top
View user's profile Send private message
Sponsored Links
Posted: 9 Jan 2009 1:50 am    Post subject: Advertisements
Back to top
Post new topic   Reply to topic    Google Community Forum Index // Web Design, Coding & Programming Forum All times are GMT - 8 Hours
Page 1 of 1


 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Host your free forums with Invision Plus.net forum web hosting with your own subdomain.

alexisBlue v1.2 // Theme Created By: Andrew Charron // Icons in Part By: Travis Carden

© 2005-2006 Google Community

Powered by phpBB

Privacy Policy | Contact Us

Powered by Google Search blog

This website is not affiliated in any way with Google, Inc.
Google™ is a registered trademark of Google, Inc.