我想编写一个 .bat 脚本,用于在 windows 8.1/windows 10 中重复通知。windows 8.1/windows 10 (cmd) 中是否有像 linux 中的“notify-send”这样的命令?
windows notifications batch-file command-prompt push-notification
int main(void) {
unsigned int x[4][3] = {(1,2,3),(4,5,6),(7,8,9),(17,11,12)};
printf("%d, %u, %u, %u \n",**x, **(x+1), **(x+2), **(x+3));
return 0;
}
Run Code Online (Sandbox Code Playgroud)
上面代码的输出是3,12,0,0.不应该是1,4,7,17,因为x存储数组的第一个元素的地址?
当我试图打印时
printf("%u, %u \n", x, &x[0][0] );
Run Code Online (Sandbox Code Playgroud)
它显示了相同的地址2108666688,2108666688
但是当我尝试使用打印数组时
for(int i = 0; i<4; ++i)
{
for(int j = 0; j<3 ; ++j)
{
printf("%d ",x[i][j]);
}
printf("\n");
}
Run Code Online (Sandbox Code Playgroud)
我看到输出为
3 6 9
12 0 0
0 0 0
0 0 0
Run Code Online (Sandbox Code Playgroud)
那么,到底发生了什么?为什么没有将数字正确分配给数组?