¡@

Home 

c++ Programming Glossary: dosomework

When to use extern “C” in C++? [duplicate]

http://stackoverflow.com/questions/1292138/when-to-use-extern-c-in-c

in C I have often seen programs coded like extern C bool doSomeWork return true Why do we use extern C block Can we replace this..

Calling a const function from a non-const object

http://stackoverflow.com/questions/407100/calling-a-const-function-from-a-non-const-object

non const object. See example struct IProcess virtual bool doSomeWork const 0L class Foo public IProcess virtual bool doSomeWork const.. doSomeWork const 0L class Foo public IProcess virtual bool doSomeWork const ... class Bar public const IProcess getProcess const return.. getProcess return ... void doOtherWork getProcess .doSomeWork Calling getProcess .doSomeWork will always results in a call..

Zero cost exception handling vs setjmp/longjmp

http://stackoverflow.com/questions/4975504/zero-cost-exception-handling-vs-setjmp-longjmp

one could optimize a loop like this while doContinue try doSomeWork catch ... Into something like this while doContinue try do doSomeWork.. catch ... Into something like this while doContinue try do doSomeWork while doContinue break catch ... But if platform supports zero.. compiler for example optimize it for you if it can assume doSomeWork has no side effects related to loop c exception gcc exception..

Why does this simple std::thread example not work?

http://stackoverflow.com/questions/6485705/why-does-this-simple-stdthread-example-not-work

Here is the sample #include thread #include iostream void doSomeWork void std cout hello from thread... std endl return int main.. std endl return int main int argc char argv std thread t doSomeWork t.join return 0 I'm trying this on Ubuntu 11.04 g version g.. join pthreads . int main int argc char argv std thread t doSomeWork t.join return 0 UPDATE This Debian bug report pointed me to..