Welcome To Snipplr


Everyone's Recent C++ Snippets



1 2 3 4 5 6 7 Next »
The Visual Studio output window will display "Detected memory leaks!" with a memory allocation number, for example, {145}. See Memory Leak Detection Enabling. Using the debugger (without changing code) see: http://msdn.microsoft.com/en-us/library/...
1 3069 posted 16 years ago by jimfred
0 1368 posted 17 years ago by iTony
Not my code - see header in source
0 1564 posted 17 years ago by rwczippy
this doesn't work at all.
0 1082 posted 17 years ago by itsok2kry
The bugged version: Somehow, it prints random characters to me like [] except the spaces filled in and other accented letters when I input more parenthesis and longer input. How to use: example-> input: 3 1+2 (1+2)*(6-2) 6-7*(9*10)/8 ou...
0 1125 posted 17 years ago by Mcgee_00
Function argument timeinterval is in seconds. For example, SimpleTimer( 5 ) would cause the program to wait for 5 seconds to elapse.
0 1452 posted 17 years ago by Raisor
0 1101 posted 17 years ago by narkisr
This demonstrates how to make your own console "scripts" using C -- for example, you could capitalize every character that comes in. Tweak the line labelled "TWEAK THIS LINE" in order to get it to do what you want. This particular example will add...
1 1193 posted 17 years ago by darkphotn
3 1536 posted 17 years ago by yuconner
this pointers are making me dizzy, so just for a reference i'll keep them here.
1 1283 posted 18 years ago by iTony
2 1230 posted 18 years ago by chrysanth
1 1524 posted 18 years ago by chrysanth
Use to get console input from the user for a file name (in the current directory) and read in from that file.
2 1386 posted 18 years ago by pckujawa
With the typical fork+exec method of spawning an application, you are left in the dark about failures in the exec. Once the fork occurs, the "main" process doesn't have any communication channel except waitpid, so it's hard to tell what happened....
1 1264 posted 18 years ago by CUViper
1 1311 posted 18 years ago by priyanhere
2 1809 posted 18 years ago by whitetiger
2 1852 posted 18 years ago by whitetiger
2 1611 posted 18 years ago by whitetiger
3 1643 posted 18 years ago by whitetiger
1 1780 posted 19 years ago by gdonald
1 1888 posted 19 years ago by gdonald
Note: This doesn't work in multi-threaded environments, check http://en.wikipedia.org/wiki/Singleton_pattern#C.2B.2B Singleton class model then: SingletonClass *pSC = SingletonClass::get_singleton_instance(); pSC->any_public_function(); or: Si...
4 2677 posted 19 years ago by yuconner
3 2372 posted 19 years ago by yuconner
1 1652 posted 19 years ago by yuconner
1 1062 posted 19 years ago by sylvan
1 1206 posted 2025 years ago by buscarini
1 2 3 4 5 6 7 Next »