Skip to content

Feature update some code #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jan 24, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1280,11 +1280,12 @@ int main(){

var num2 float32 = 3.14
// 不能将其它基本类型强制转换为字符串类型
// Cannot convert an expression of the type 'float32' to the type 'string'
var str2 string = string(num2)
fmt.Println(str2)

var str3 string = "97"
// 不能强制转换, cannot convert str2 (type string) to type int
// 不能强制转换, cannot convert str3 (type string) to type int
var num3 int = int(str3)
fmt.Println(num3)
}
Expand Down