User Profile

Collapse

Profile Sidebar

Collapse
MajesTEK
MajesTEK
Last Activity: Aug 11 '08, 02:16 PM
Joined: Aug 8 '08
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Hi Edward,

    Yes your right, I am using a character array, not character string. Im in process of wrapping my head around the array manipulation, so I mistakenly call arrays of characters as strings. I will start paying more attention to that. Thank you for the input and the code example. Could you provide the same but for the manipulation of the array. It seems my code would work with the changes suggested. I will try that. Thank you...
    See more | Go to post

    Leave a comment:


  • ahh ok that works. So something like


    unsigned char string_raray[] = {10,100,10,120, 100,10};

    int a,b,counter;
    a = 0;
    c = string_array[a]

    for (b=0;b < strlen(string_a rray);b++)
    {
    if (c == ",") {
    conter++
    }
    };
    int finalcount = counter +1
    See more | Go to post

    Leave a comment:


  • MajesTEK
    started a topic Function to determine how many items in a string
    in C

    Function to determine how many items in a string

    Hi everyone,

    I'm new to C programming and trying to do something.

    I have a character string. Its just numbers delimited by a comma.

    Example.

    unsigned char string[] = {1,2,3,4,5,6};


    I need to count how many items there are. This is for a function that needs to know how many items its getting. There are more strings so Its not a fixed value. And I can't just use a maximum...
    See more | Go to post
No activity results to display
Show More
Working...