cpp-programming

Simple C++ programs
git clone git://git.laack.co/cpp-programming.git
Log | Files | Refs | README

alias.cpp (318B)


      1 #include <iostream>
      2 #include <string>
      3 
      4 
      5 void printHello(std::string name, uint  age) {
      6     std::cout << "hello " << name << ", " << age << std::endl;
      7     return;
      8 }
      9 
     10 int main() { 
     11     // could also use auto...
     12     using fn = void(std::string, uint);
     13     fn* prnt = printHello;
     14 
     15     prnt("Andrew", 200);
     16     return 0;
     17 }