我有两个文件调用vvn.c,aqu.c
我做了更改vvn.c,我有我的git提交.如何樱桃选择相同的变化aqu.c
唯一的区别是API.
vvn.c 包含API作为 vvn_function_names()
而aqu.c包含API的unions_function_names()
我不知道该怎么做.我知道樱桃采摘到同一个文件.有没有办法做到这一点?
我正在使用Java。我想知道为什么Java会产生此输出。我在这里分享代码。
public class vvn {
public static void main(String[] args)
{
byte [] arr = new byte[4];
arr[0] = (byte)157;
arr[1] = 1;
arr[2] = 0;
arr[3] = 0;
System.out.format("read 0x%x 0x%x 0x%x 0x%x \n",arr[3],arr[2],arr[1],arr[0]);
int v = (arr[0] | (arr[1] << 8) | (arr[2] << 16) | (arr[3] << 24));
System.out.format("read 0x%x\n",v);
}
}
Run Code Online (Sandbox Code Playgroud)
我得到的输出为
read 0x0 0x0 0x1 0x9d
read 0xffffff9d
Run Code Online (Sandbox Code Playgroud)
我预计输出应为0x0000019d
我有以下代码
struct my_struct {
const char **enjoy;
};
const char * enjy[] = {
"Cricket", "movie", "",
"Ball", "eat", "",
};
static const struct my_struct my_struct_table[1] = {
[0] = {
.enjoy = enjy
}
};
Run Code Online (Sandbox Code Playgroud)
现在我想使用那个最终结构,并希望使用它进行迭代.我该如何迭代使用my_struct_table[0].enjoy
我想打印enjy变量中的所有字符串.