q when i do cout 10 under unix it display 10 - using a dot-period but when i do the same code under window it

bad_alloc by default

infact

so you don't have to explicitly check the return value

so when i use new.. i have every time to check the returned value ??

or catch the exception
but this might be heavy

yes i know, i don't like exception

if you expect a lot of memory allocation errors?

not especially

use new(nothrow) if you don't want it to throw an exception on failure

so if i don't use catch i have to chech the value returned by new ?

what are you going to do about running out of memory anyway, aside from quitting the application?

new(nothrow) ??

http://www.gotw.ca/publications/mill16.htm

no, i am coding a http server
so if i have a memory allocation error, i have to quit properly the server

exceptions make it too easy and you want to do extra work?

but do you mean that if i have a "new" error, my app is automaticly exited ???

yes, unless you catch the exception

hi, got a question about inheritance in nested C++ classes. let say I have a class A and its nested class Anested, and a class B inherited from A. Can I make a nested class of B, class BNested inherited from Anested ?

no it is just that try, catch is heavy

P_ yes

Rain|code, hi and thx!

hi

thadeus, I don't know of any platform where try is heavy

but which is the sense to cross nested inheritance?

Metabol, do a test, i can assure you that try catch is very heavy

meta, right, I meant tedious

but i don;'t understand, if a message is thrown and if i haven't catched it, i will have a abort message in the term, no ??

no

let say i have a Filter class with a nested class Properties, and a SpecialFilter class with its nested class SpecialFilterProperties inherited from Filter

 PHP 5 Web Hosting | PHP 5 Hosting

*
To prove that you're not a bot, enter this code
Anti-Spam Image

Leave a Comment

You must be logged in to post a comment.


Blog Tags:

Similar posts: