本文介绍了如何获得contiki中列表的最后一项?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 29岁程序员,3月因学历无情被辞! 在Contiki列表函数中,没有用于访问列表的最后一项的功能。我们是否需要使用for循环访问最后一项? 我尝试过:Hi, In Contiki list functions there is no function for accessing the last item of a list. Do we need to use a for loop to access the last item?What I have tried:struct record *n;for(n = list_head(record_list); n != null; n = n>next){ if(n->next == null){ printf("last record = %s \n",n->message ); }}推荐答案 这篇关于如何获得contiki中列表的最后一项?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 上岸,阿里云!
06-11 03:48