# LinkedList in C++

#include <iostream> #include <string> struct listNode { int numOfBirds; listNode * next; }; void totalBirds(){ if(temp ->next == NULL){ ; } } int main() { listNode * node = new listNode; listNode * temp = node; node -> numOfBirds = 7; node = new listNode; node -> numOfBirds = 5; temp -> next = node; temp = temp -> next; node = new listNode; node -> numOfBirds = 3; temp -> next = node; temp = temp -> next; node = new listNode; node -> numOfBirds = 10; temp -> next = node; temp = temp -> next; node = new listNode; node -> numOfBirds = 2; temp -> next = node; temp = temp -> next; node -> next = NULL; totalBirds(); return 0; };