codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#define FLUXCAP_DLL_IMPL #include "FluxCapacitor.h" #include <string> DLL FluxCapacitor* DLLCALL get_flux_capacitor(double flux_intensity) { try { return new FluxCapacitor(flux_intensity); } catch (...) { return 0; } } DLL int DLLCALL flux_capacitor_capacitate(FluxCapacitor* fc, double jigawatts, const char* name) { try { return fc->capacitate(jigawatts, std::string(name)); } catch (...) { return -1; } } DLL void DLLCALL release_flux_capacitor(FluxCapacitor* fc) { delete fc; }
Private
[
?
]
Run code
Submit