Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > Doubt in prototype declaration.

Reply
Thread Tools

Doubt in prototype declaration.

 
 
mthread
Guest
Posts: n/a
 
      05-12-2008
Hi,
I came across this prototype declaration

virtual const char* what() const throw()

I would like to know what is the purpose of last two words 'const
throw()'

 
Reply With Quote
 
 
 
 
gnuyuva
Guest
Posts: n/a
 
      05-12-2008
On May 12, 10:45 am, mthread <(E-Mail Removed)> wrote:
> Hi,
> I came across this prototype declaration
>
> virtual const char* what() const throw()


'const' associated with the function declaration (in a class) promises
that this function is not going to alter any of the non-static class
members(data). 'throw()' says that this function won't throw any
exception. You can also refer to your favourite C++ book.

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Prototype WTP 0.2 released,this release for Prototype 1.6.0 javascript fish Javascript 0 10-11-2008 07:35 AM
Class prototype vs C function prototype June Lee C++ 2 04-13-2008 08:17 PM
Prototype Object.extend(new Base() | Hash | Hash.prototype) usage: jacobstr@gmail.com Javascript 3 03-27-2007 07:56 AM
doubt about doubt Bob Nelson C Programming 11 07-30-2006 08:17 PM
relation between prototype and Prototype.js shypen42@yahoo.fr Javascript 9 05-26-2006 01:13 AM



Advertisments