Hello,
I can not figure this code out! I have a function that needs to access an element of the the linked list as an argument. Could someone give me an example of the syntax? Do you have any examples of using an element as the arguement in a linked list in a function???
Here is a simplified verison of what I am trying to do:
struct ListNode
{
int value;
struct ListNode *next
}
main {
ListNode L;
// menu here to let user select
char choice;
if (choice == 'a') {
cin choice;
L.average(value ); // How do you get the value out of the Linked List into the arguement of the function????
I need to know how to work the value into the function???? - ty --CTYD
I can not figure this code out! I have a function that needs to access an element of the the linked list as an argument. Could someone give me an example of the syntax? Do you have any examples of using an element as the arguement in a linked list in a function???
Here is a simplified verison of what I am trying to do:
struct ListNode
{
int value;
struct ListNode *next
}
main {
ListNode L;
// menu here to let user select
char choice;
if (choice == 'a') {
cin choice;
L.average(value ); // How do you get the value out of the Linked List into the arguement of the function????
I need to know how to work the value into the function???? - ty --CTYD
Comment