Search:

Type: Posts; User: 68656c70

Search: Search took 0.00 seconds.

  1. I think you should use threads. One thread that...

    I think you should use threads. One thread that includes a while loop...



    while (flag == 0) {

    // do movement stuff...

    }
  2. Replies
    11
    Views
    1,210

    Add 1 to your pointer, or subtract 1.

    Add 1 to your pointer, or subtract 1.
  3. Replies
    23
    Views
    2,785

    Okay okay void append(struct node *q, int...

    Okay okay



    void append(struct node *q, int num)
    {
    struct node *temp;
    printf("\n in append");
    temp = (struct node *)malloc(sizeof(struct node));
    temp->data = num;
  4. Replies
    17
    Views
    6,230

    @C_Enthusiast: At least you can draw something...

    @C_Enthusiast: At least you can draw something...
  5. Replies
    11
    Views
    1,210

    char *m[] = {"data\0", "come\0", "here\0"}; ...

    char *m[] = {"data\0", "come\0", "here\0"};

    for (p=0; p<3; p++) printf("%s\n", m[p]);
  6. Replies
    23
    Views
    2,785

    Could be void... it isn't that significant at...

    Could be void... it isn't that significant at this point. I concentrated on logical errors rather than syntactical errors. Gcc didn't throw any errors/warnings though.
  7. Replies
    23
    Views
    2,785

    Maybe this will help you: append(struct...

    Maybe this will help you:



    append(struct node *q, int num)
    {
    struct node *temp;
    printf("\n in append");
    temp = (struct node *)malloc(sizeof(struct node));
    temp->data =...
  8. Replies
    12
    Views
    1,878

    I program in C when speed and efficiency are...

    I program in C when speed and efficiency are primary goals. :)
  9. Replies
    17
    Views
    6,230

    I was talking to C_Enthusiast... :)

    I was talking to C_Enthusiast... :)
  10. Replies
    17
    Views
    6,230

    A graphic representation would really help...

    A graphic representation would really help...
  11. Replies
    2
    Views
    1,461

    Can you ping both networks from the same device...

    Can you ping both networks from the same device at the same time? That would be odd.
  12. Replies
    22
    Views
    3,006

    Style 2 all the way! Easier to read imo...

    Style 2 all the way! Easier to read imo...
  13. Replies
    17
    Views
    6,230

    If you sort your input, you have a linked list.

    If you sort your input, you have a linked list.
  14. Replies
    17
    Views
    6,230

    I hope it's bug-free... and correct. ...

    I hope it's bug-free... and correct.



    #include <stdio.h>
    #include <stdlib.h>

    struct tree_node {
    int data;
    struct tree_node *parent;
  15. Try this (includes a minor optimization in...

    Try this (includes a minor optimization in execution speed):



    #include <stdio.h>
    #include <stdlib.h>
    #include <string.h>
    int main() {
    int i;
    int count = 0;
  16. Replies
    17
    Views
    6,230

    struct tree_node { char data[80]; ...

    struct tree_node {
    char data[80];
    struct tree_node *parent;
    struct tree_node *left_child;
    struct tree_node *right_child;
    };



    All else depends on traversal type:
  17. Replies
    6
    Views
    1,499

    Thank you all for your help! Changed:...

    Thank you all for your help!

    Changed: strncpy(str, (enc + 2), (strlen(enc) - 2));
    To: strcpy(str, (enc + 2));

    ...now works as desired.


    P.S.: Couldn't imagine strncpy would cause such a...
  18. Replies
    6
    Views
    1,499

    strlen(enc) wouldn't work either... NULL byte...

    strlen(enc) wouldn't work either...

    NULL byte was added on purpose at the end of those string literals.

    Indeed replacing (strlen(enc) - 2) and strlen(str) with 128 DOES solve the problem!
    ...
  19. Replies
    6
    Views
    1,499

    Am I the only one having this problem? Please...

    Am I the only one having this problem?

    Please try to compile and run using:
    rotated[32] = 0x01;
    for example.

    I can't understand how can stack smashing detection get triggered by that byte of...
  20. Replies
    6
    Views
    1,499

    Really weird stack smashing problem

    $uname -a
    Linux localhost 2.6.28-18-generic #60-Ubuntu SMP Fri Mar 12 04:40:52 UTC 2010 i686 GNU/Linux
    $$ gcc --version
    gcc (Ubuntu 4.3.3-5ubuntu4) 4.3.3


    Feel free to experiment with the...
Results 1 to 20 of 23