¡@

Home 

c++ Programming Glossary: do_something

Are the days of passing const std::string & as a parameter over?

http://stackoverflow.com/questions/10231349/are-the-days-of-passing-const-stdstring-as-a-parameter-over

such as the following is now preferable std string do_something std string inval std string return_val ... do stuff ... return..

How to put two increment statements in a C++ 'for' loop?

http://stackoverflow.com/questions/1232176/how-to-put-two-increment-statements-in-a-c-for-loop

instead of one. So something like for int i 0 i 5 i and j do_something i j What is the syntax for this c for loop comma operator .. and returns the second operand. Thus for int i 0 i 5 i j do_something i j But is it really a comma operator Now having wrote that..

Extend the life of threads with synchronization (C++11)

http://stackoverflow.com/questions/15252292/extend-the-life-of-threads-with-synchronization-c11

#include thread #include climits ... void myfunc void p do_something p int main void myp n_threads a_location another_location .....

Do you use NULL or 0 (zero) for pointers in C++?

http://stackoverflow.com/questions/176989/do-you-use-null-or-0-zero-for-pointers-in-c

since I also like to test pointers as truth values if p q do_something then using zero makes more sense as in if you use NULL you cannot..

Creating a new object from dynamic type info

http://stackoverflow.com/questions/2032881/creating-a-new-object-from-dynamic-type-info

but impossible without returning a smart pointer obj.clone do_something Object factory If you'd prefer to do exactly as you asked and..

C++ - passing references to boost::shared_ptr

http://stackoverflow.com/questions/327573/c-passing-references-to-boostshared-ptr

boost shared_ptr foo sp Again no copy here ... sp do_something ... I can't see in both cases a good reason to pass the boost.. boost shared_ptr foo sp Again no copy here ... sp do_something ... How do you know that sp do_something will not blow up due.. copy here ... sp do_something ... How do you know that sp do_something will not blow up due to a null pointer It all depends what is..

How do I pass a reference to a two-dimensional array to a function?

http://stackoverflow.com/questions/404232/how-do-i-pass-a-reference-to-a-two-dimensional-array-to-a-function

const int board_width 80 const int board_height 80 void do_something int board_width board_height array function prototype But this.. at compile time this will do it function prototype void do_something int array board_width board_height Doing it with void do_something.. int array board_width board_height Doing it with void do_something int array board_width board_height Will actually pass a pointer..

C++ #include guards

http://stackoverflow.com/questions/8020113/c-include-guards

C++11 - static_assert within constexpr function?

http://stackoverflow.com/questions/8626055/c11-static-assert-within-constexpr-function

within a constexpr function For example constexpr int do_something int x static_assert x 0 x must be 0 return x 5 This is not valid.. expression will then fail to compile constexpr int do_something int x return x 0 x 5 throw std logic_error x must be 0 share..

C++ function pointer (class member) to non-static member function

http://stackoverflow.com/questions/990625/c-function-pointer-class-member-to-non-static-member-function

member to non static member function class Foo public Foo do_something Foo func_x int Foo do_something int function pointer to class.. class Foo public Foo do_something Foo func_x int Foo do_something int function pointer to class member function void setFunc bool.. pointer to class member function void setFunc bool e do_something e Foo func_x Foo func_y private int func_x int m return m 5..