这是给我带来麻烦的代码.
f = Frame(root, width=1000, bg="blue")
f.pack(fill=X, expand=True)
l = Label(f, text="hi", width=10, bg="red", fg="white")
l.pack()
Run Code Online (Sandbox Code Playgroud)
如果我使用Label注释掉行,则Frame会以正确的宽度显示.但是,添加Label似乎会将Frame缩小到Label的大小.有没有办法防止这种情况发生?
例如,
gcc编译好了......
char s[7] = "abc";
Run Code Online (Sandbox Code Playgroud)
但它给出了错误"赋值不兼容的类型"与...
char s[7];
s = "abc";
Run Code Online (Sandbox Code Playgroud)
有什么不同?