func Print(s string) { cs := C.CString(s) defer C.free(unsafe.Pointer(cs)) C.fputs(cs, (*C.FILE)(C.stdout)) }
func (f *File) WriteString(s string) { p := C.CString(s) C.fputs(p, (*C.FILE)(f)) C.free(unsafe.Pointer(p)) f.Flush() }
func main() { f := new(C.FILE) p := C.CString("string content") C.fputs(p, (*C.FILE)(f)) }
func main() { value := C.CString("Oi\n") C.fputs(value, (*C.FILE)(C.stdout)) }