This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <utility> // std::forward | |
template< typename T, typename... Args > | |
void SetValues( T* t, Args&&... args ) { | |
SetValues( t ); | |
SetValues( std::forward< Args >( args )... ); | |
} | |
template<> void SetValues< int >( int *p ) { *p = 69; } | |
template<> void SetValues< float >( float* p ) { *p = 3.14f; } | |
#include <iostream> // std::cout, std::endl |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifdef _WIN32 | |
#include <conio.h> // _getch | |
#include <ctype.h> // toupper | |
#include <stdio.h> // printf | |
int main(int argc, char** ) | |
{ | |
printf( "Press F to pay respects: " ); | |
for( ;; ) | |
{ |
OlderNewer