codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
#include <stdio.h> #include <string> struct FileName { char __thunk[4]; }; extern "C" { void * ctor_FileName(char* name); FileName value_FileName(void* cppObj); } int main() { printf("sizeof(FileName)=%d\n", sizeof(FileName)); char filePath[] = "foo\0"; void* cppObj = ctor_FileName(filePath); value_FileName(cppObj); printf("ok.\n"); return 0; }
Private
[
?
]
Run code
Submit