2019年5月9日

Rust Linking With C Library Functions

摘要: #[link(name = "c")] extern "C" { fn scanf(format: *const u8, ...); } fn main() { let mut a = 0; let mut b = 0; unsafe { scanf("%d%d\0".as_ptr(), &mut a, &mut b); } pr... 阅读全文

posted @ 2019-05-09 14:25 JebediahKerman 阅读(200) 评论(0) 推荐(0)

导航