Search:

Type: Posts; User: Jesius

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    14
    Views
    2,277

    char input; char h; char b; ...

    char input;
    char h;
    char b;

    printf("enter input: ");
    scanf("%c", &input);
  2. void rtrim (char * s ) { int end; end =...

    void rtrim (char * s ) {
    int end;
    end = strlen(s) - 1;
    while(end >= 0 && s[end] == ' ')
    {
    end--;
    }
    if(end>=0 && s[end]!=' ')
    {
    s[end] = '\0';
  3. Replies
    9
    Views
    1,619

    code like: if('A'

    code like:


    if('A'<=c && c<='Z')
    ....
  4. Replies
    15
    Views
    4,651

    what do you want to print out? d is counting...

    what do you want to print out?
    d is counting number of '\0' in each word
  5. Replies
    4
    Views
    1,678

    when you found the node to be delete, you should...

    when you found the node to be delete, you should break out the while,


    while (!found && (current->link)!=NULL)
    {
    if (strcmp((current->link->last),lastName)==0)
    {...
  6. struct mystruct { int item1, item2, item3,...

    struct mystruct {
    int item1, item2, item3, item4, item5, item10; // I think you get the point
    } mystruct = {
    item1: 1,
    item2: 2,
    item5: 5,
    item4: 4,
    };
  7. Replies
    2
    Views
    2,159

    changed this line void arc(float c, int...

    changed this line


    void arc(float c, int *arcn);

    to


    void arc(float *c, int *arcn);
  8. Thread: Arrays in C

    by Jesius
    Replies
    5
    Views
    1,177

    int sum = 0; for(i = 0; i

    int sum = 0;
    for(i = 0; i<arrLen; i++)
    {
    sum+=sum*10+_array[i];
    }
  9. Replies
    13
    Views
    5,356

    You have stored the text in the array, you can...

    You have stored the text in the array, you can use it directly.
  10. function startcomedi have two args: int...

    function startcomedi have two args:


    int startcomedi(unsigned int subdevice,comedi_t *device);


    but when you call it, you only pass one arg to it.
  11. Replies
    5
    Views
    956

    as the code you pasted, you should use method 1.

    as the code you pasted, you should use method 1.
  12. Replies
    6
    Views
    1,781

    it should be changed.

    it should be changed.
  13. Replies
    2
    Views
    1,031

    *dnptr1=*((*doublenode)sinptr1); should be ...

    *dnptr1=*((*doublenode)sinptr1);

    should be


    *dnptr1=*((doublenode *)sinptr1);
  14. Replies
    4
    Views
    1,043

    you can use strcmp to convert the month: ...

    you can use strcmp to convert the month:


    char month[10];
    if(!strcmp(month,"November"))
    {
    info[counter].bDate.month = 11;
    }
  15. Replies
    19
    Views
    2,913

    typedef struct { int number; }Number; ...

    typedef struct
    {
    int number;
    }Number;

    int fun(Number num1,Number num2)
    {
    return (num1.number-num2.number);
    }
  16. Replies
    12
    Views
    3,559

    just sort the array in descending order, then put...

    just sort the array in descending order, then put it out .



    selection_sort(10, a[i]);


    it is wrong when you call selection_sort like this. the sec arg of this function is "int *"
  17. Thread: structure copy

    by Jesius
    Replies
    7
    Views
    3,474

    just "=" is ok for each array element; you can...

    just "=" is ok for each array element;
    you can also use memcpy, memcpy(WordCopy,Word,MAXWORDS);
  18. Replies
    7
    Views
    1,103

    i was confused...

    i was confused...
  19. Replies
    3
    Views
    3,104

    "" is a string literal, include '\0' at the end.

    "" is a string literal, include '\0' at the end.
  20. Replies
    3
    Views
    1,788

    i was confused really..

    i was confused really..
  21. Replies
    9
    Views
    1,920

    u can malloc a buffer first, and test if the...

    u can malloc a buffer first, and test if the buffer is full, if it is full, then u can relloc the buffer
  22. in this case, they are the same, u don't know...

    in this case, they are the same, u don't know whether the arg is a array or a string
  23. Replies
    2
    Views
    1,433

    yes, you can compare them directly

    yes, you can compare them directly
  24. Replies
    15
    Views
    6,621

    got it...

    got it...
  25. Replies
    6
    Views
    1,454

    define array c longer length. int c[255] =...

    define array c longer length.


    int c[255] = {0};

    then when you do " a[5] = {4,4,4,4,4,4}+b[5] = {4,4,4,4,4,4};"
    the result put into c can be begin from 0,
    like c[0] = a[4]+b[4],c[1] =...
Results 1 to 25 of 31
Page 1 of 2 1 2