Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Programming / CodeWarrior / January 2004



Tip: Looking for answers? Try searching our database.

no throw syntax

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Richard C Frank - 22 Jan 2004 19:16 GMT
Hmmm... I thought that I could specify new foo() to return nil by going:

theFoo = new (nothrow) foo();

but that seems to not work. How do I get new to not throw?

Thanks,

Rick
Ben Combee - 22 Jan 2004 20:58 GMT
> Hmmm... I thought that I could specify new foo() to return nil by going:
>
> theFoo = new (nothrow) foo();
>
> but that seems to not work. How do I get new to not throw?

Do you need to say

theFoo = new (std::nothrow) foo();

instead?  Or was a "#include <new> ... using namespace std;" implied?

Signature

Ben Combee <bcombee@metrowerks.com>
CodeWarrior for Palm OS technical lead
Palm OS programming help at http://www.palmoswerks.com/

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.