我正在使用VC2010,并编写以下代码来测试"__beginthreadex"
#include <process.h>
#include <iostream>
unsigned int __stdcall threadproc(void* lparam)
{
std::cout << "my thread" << std::endl;
return 0;
}
int _tmain(int argc, _TCHAR* argv[])
{
unsigned uiThread1ID = 0;
uintptr_t th = _beginthreadex(NULL, 0, threadproc, NULL, 0, &uiThread1ID);
return 0;
}
Run Code Online (Sandbox Code Playgroud)
但没有任何东西打印到控制台.我的代码出了什么问题?
我有像这样的HTML元素.
<div id="A">
<div id="B"></div>
<div id="C"></div>
</div>
Run Code Online (Sandbox Code Playgroud)
"B"和"C"都有子元素.对于"B",其高度是动态的,基于其内容.现在,我想将"C"的高度设置为"A"的高度减去"B"的高度.有谁知道如何通过CSS做到这一点?