Are you sure you want to delete the question?
Leaving a resolved question undeleted may help others!
Go言語でprintlnとprintは実行できるのですがprintfのみundifinedと表示されてしまい困っています。 解決方法を教えていただきたいです。
printfを記述するとundifinedとエラーが出てしまう
package main func main() { println("hello") print("hello print\n") str := "hello printf" printf("%s", str) }
fmtパッケージのfmt.Printfやfmt.Fprintfを利用するとよいと思います。
@teppei0710
出力することができました。 ご回答ありがとうございました。