使用hammer手机端手指滑动实现图片轮播,求代码,谢谢
1个回答
2016-01-07
展开全部
if(pipe(fd_pipe) == 0) //创建管道
{
pid = fork();
if(pid > 0)
{
pid_res = wait(&stat_value);
if(pid_res > 0)
{
count = read(fd_pipe[0],output,BUFSIZ); //从管道中读取数据
printf("father process read %d characters,they are: %s \n",count,output);
}
}
else if(pid == 0)
{
count = write(fd_pipe[1],input,strlen(input)); //向管道中写入数据
printf("son process write %d characters,they are : %s \n",count,input);
}
else
{
printf("create process failed \n");
return 1;
}
{
pid = fork();
if(pid > 0)
{
pid_res = wait(&stat_value);
if(pid_res > 0)
{
count = read(fd_pipe[0],output,BUFSIZ); //从管道中读取数据
printf("father process read %d characters,they are: %s \n",count,output);
}
}
else if(pid == 0)
{
count = write(fd_pipe[1],input,strlen(input)); //向管道中写入数据
printf("son process write %d characters,they are : %s \n",count,input);
}
else
{
printf("create process failed \n");
return 1;
}
追问
你好谢谢你的回答,我的图片在电脑上可以实现轮播的,我想手机端访问这个页面时候,也可以正常轮播,不过加一个手指滑动这个图片,就会立刻出现下一张图片
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询