c++ Programming Glossary: untested
Meaning of acronym SSO in the context of std::string http://stackoverflow.com/questions/10315041/meaning-of-acronym-sso-in-the-context-of-stdstring no space would look something a little more like this untested example purposes only class string public all 83 member functions..
Alternatives to dlsym() and dlopen() in C++ http://stackoverflow.com/questions/1067346/alternatives-to-dlsym-and-dlopen-in-c other functions through a pointer to that table. Example untested libfoo.h struct APIs void api1 void void api2 int long api3..
Win32 API to enumerate dll export functions? http://stackoverflow.com/questions/1128150/win32-api-to-enumerate-dll-export-functions i printf Export s n BYTE lib DWORD names i Totally untested but I think it's more or less correct. Famous last words. ..
Sorting a std::map by value before output & destroy http://stackoverflow.com/questions/1367429/sorting-a-stdmap-by-value-before-output-destroy contains the remaining pairs in an unspecified order. Code untested typedef std pair std string int mypair struct IntCmp bool operator..
Multiple dispatch in C++ http://stackoverflow.com/questions/1749534/multiple-dispatch-in-c call. Here's an example that won't work right in C untested class A class B public A class C public A class Foo virtual..
Reading directly from an std::istream into an std::string http://stackoverflow.com/questions/1816319/reading-directly-from-an-stdistream-into-an-stdstring len 2 std string str len ' 0' is.read str 0 len This is untested and I don't know if strings are mandated to have contiguous..
How do you reverse a string in place in C or C++? http://stackoverflow.com/questions/198199/how-do-you-reverse-a-string-in-place-in-c-or-c www.macchiato.com unicode chart Also UTF 8 over 0x10000 is untested as I don't seem to have any font for it nor the patience to..
Removing a non empty directory programmatically in C or C++ [duplicate] http://stackoverflow.com/questions/2256945/removing-a-non-empty-directory-programmatically-in-c-or-c Here's an example that might work on Unix completely untested int remove_directory const char path DIR d opendir path size_t..
Rotating a point about another point (2D) http://stackoverflow.com/questions/2259476/rotating-a-point-about-another-point-2d pivot point cx cy then rotate it then add the point again. untested POINT rotate_point float cx float cy float angle POINT p float..
C++0x Lambda to function pointer in VS 2010 http://stackoverflow.com/questions/3351280/c0x-lambda-to-function-pointer-in-vs-2010 in it yet. Here's a possible generic work around very untested #include functional #include iostream namespace detail helper..
Why does ostream_iterator not work as expected? http://stackoverflow.com/questions/4447827/why-does-ostream-iterator-not-work-as-expected you can use C 11 inheriting from std pair should be easy untested struct PAIR std pair using std pair pair If you cannot use C..
How could one implement std::auto_ptr's copy constructor? http://stackoverflow.com/questions/4514124/how-could-one-implement-stdauto-ptrs-copy-constructor inheritance. I think the code is mostly correct but it's untested. Our basic auto_int look something like this class auto_int..
How do I DllExport a C++ Class for use in a C# Application http://stackoverflow.com/questions/4741035/how-do-i-dllexport-a-c-class-for-use-in-a-c-sharp-application A C style interface would look something like this warning untested code extern C __declspec dllexport void CExampleExport_New int.. param A C CLI style wrapper would look like this warning untested code ref class ExampleExport private CExampleExport impl public..
Is there an alternative to using % (modulus) in C/C++? http://stackoverflow.com/questions/48053/is-there-an-alternative-to-using-modulus-in-c-c 7 7 3 17. So you'll need one more octal step. The complete untested C version could be written like unsigned char Mod7Byte unsigned..
Why was pair range access removed from C++11? http://stackoverflow.com/questions/6167598/why-was-pair-range-access-removed-from-c11 int int mm ... for auto p as_range mm.equal_range 42 ... untested I agree this is a bit of a wart. Functions which return valid..
Could someone post a simple C or C++ TCP server and client example? http://stackoverflow.com/questions/662328/could-someone-post-a-simple-c-or-c-tcp-server-and-client-example
C++: Pointer to class data member http://stackoverflow.com/questions/670734/c-pointer-to-class-data-member in a small space defeats me. The following is my best untested try an Apply function that would do some pre post processing..
I want to make my own Malloc http://stackoverflow.com/questions/732617/i-want-to-make-my-own-malloc consider this timeline warning this is not complete and untested just for illustration for entertainment only no warranty express..
How do I convert a big-endian struct to a little endian-struct? http://stackoverflow.com/questions/859535/how-do-i-convert-a-big-endian-struct-to-a-little-endian-struct it should be fairly straightforward. Something like this untested code should do the job Functions to swap the endian of 16 and..
|