CPP/Boost/Signals2/Parameters

From ProgrammingExamples
< CPP
Revision as of 11:54, 1 February 2011 by Daviddoria (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Parameters.cpp

#include <boost/signals2/signal.hpp>
#include <iostream>
 
void func(float value)
{
  std::cout << "value is " << value << std::endl;
}
 
int main()
{
  boost::signals2::signal<void (float)> s;
  s.connect(func);
  s(5.1);
}

CMakeLists.txt

cmake_minimum_required(VERSION 2.6)
 
Project(Parameters)
 
ADD_EXECUTABLE(Parameters Parameters.cpp)