我有两个整数阵列,"a"和"b".我想找到[0],[1]等是否也在b []内.我试过这个:
int emfanisi(int a[], int b[], int x){
int i, j;
for(i=0; i<x; i++)
{
for(j=0; j<x; j++)
{
if(a[i] = b[j])
{
return 1;
}
else
{
return 0;
}
}
}
}
Run Code Online (Sandbox Code Playgroud)
主要是我这样做:
for(i=0; i<2; i++){
pos = 0;
pos = emfanisi(a,b,2);
if(pos = 1)
printf("The %d number shows in the second array\n", i+1);
else
printf("The %d number doesnt show in the second array\n", i+1);
}
Run Code Online (Sandbox Code Playgroud)
但这似乎不起作用!
有人可以指出我的错误吗?
我想在单击按钮时向我的应用添加编辑文本字段,但我不会更改布局.只需将其添加到xml文件定义的现有文件下面即可.假设我有一个联系人应用程序,如果用户需要添加一个额外的字段按下按钮并创建一个!怎么做?