我在我正在试用的新C++编辑器(CLion)中有这段代码:structscreenPoint{floatx=0,y=0;screenPoint(floatx_,floaty_):x{x_},y{y_}{}};structposition{screenPointul;floatwidth=0,height=0;position(screenPointp,floatw,floath):ul{p},width{w},height{h}{}};接近尾声的是初始化语句ul{p},我认为这是使用大括号初始化的有效C++方法。然而,CLion提示道:初始化器中的不兼容类型:“float”和“scre
谁能解释一下我从这个使用std::map的简单程序中得到的输出。请注意,我将p插入到map中,但没有插入q但它说它找到了它们,而且还说map中只有1个元素!#include#includestructscreenPoint{floatx=0,y=0;screenPoint(floatx_,floaty_):x{x_},y{y_}{}};booloperatorpositions;intmain(intargc,constchar*argv[]){autop=screenPoint(1,2);autoq=screenPoint(2,1);positions.emplace(p,3);au