]> git.tdb.fi Git - ext/sigc++-2.0.git/blob - hello_world.cc
aff82f2c1c176f3fe2a1f70ee12feda60562bd39
[ext/sigc++-2.0.git] / hello_world.cc
1 /* Copyright 2003, The libsigc++ Development Team
2  *
3  *  Assigned to the public domain.  Use as you wish without
4  *  restriction.
5  */
6
7 #include <iostream>
8 #include <string>
9
10 #include <sigc++/sigc++.h>
11
12 void on_print(const std::string& str)
13 {
14   std::cout << str;
15 }
16
17 int main()
18 {
19   sigc::signal<void, const std::string&> signal_print;
20   
21   signal_print.connect( sigc::ptr_fun(&on_print) );
22   
23   signal_print.emit("hello world\n");
24
25   return 0;
26 }