Search:

Type: Posts; User: failure67

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. I only skimmed through your code, so this is...

    I only skimmed through your code, so this is purely an almost random guess.


    } else if (strcmp(cmd_argv[0], "add_xct") == 0 && cmd_argc == 3) { if ((g = find_group(group_list,...
  2. Replies
    7
    Views
    49,475

    int arr [20] ; rand () and srand ()...

    int arr [20] ;



    rand () and srand ()
  3. Replies
    5
    Views
    8,706

    My bad, I skipped the fact you're using MSVS....

    My bad, I skipped the fact you're using MSVS. MSVS is a c++ compiler, and the c++ language requires the casts that you added to your code. Pure C does not require (or recommend) those casts.


    ...
  4. Replies
    5
    Views
    8,706

    When people say they are implementing a function,...

    When people say they are implementing a function, they usually mean that they are writing that function. It doesn't look like you are creating your own custom malloc, calloc, and free functions. I am...
  5. Replies
    6
    Views
    1,313

    binNum will never become NULL if malloc...

    binNum will never become NULL if malloc succeeded, so the while loop in your main function will run forever (or until SegFault, whichever comes first). You're also printing the binary backwards....
  6. Replies
    1
    Views
    1,044

    In your example, according to your output, only...

    In your example, according to your output, only three additions actually took place. Do you want:

    A) 5 additions to take place or
    B) Do you want to stop once your reach the 5th element of your...
  7. Replies
    7
    Views
    4,115

    I haven't really posted in any of your threads...

    I haven't really posted in any of your threads because I honestly don't understand anything about your program, but I've been following this over the weeks. So just because very few people are...
  8. Replies
    10
    Views
    4,652

    Look at my updated post. You should use a...

    Look at my updated post. You should use a function like pow for what you're trying to accomplish.
  9. Replies
    10
    Views
    4,652

    Just skimming your code, so I could be totally...

    Just skimming your code, so I could be totally wrong, but I imagine you're not meaning to use the XOR operation in line 24.

    Just in case you don't know what I mean:
    temp =...
  10. Replies
    2
    Views
    3,356

    I'm guessing RETI stands for "return from...

    I'm guessing RETI stands for "return from Interrupt". This is a really vague question because it depends on the type of architecture you're learning about. For instance, my school used a simplified...
  11. Replies
    14
    Views
    3,401

    A String is just an array of characters. You can...

    A String is just an array of characters. You can either use an array like this

    char ch[32];
    or you can allocate memory to a pointer and treat it as an array.

    So like Tater implied, what you...
  12. Replies
    18
    Views
    4,367

    Just in case you come back for help, here's an...

    Just in case you come back for help, here's an additional hint. Take Salem's code and add one print statement to it; that's all you need to do. Also, look up the left shift operation.
    Bitwise...
  13. Lookup atoi or strtol for converting the command...

    Lookup atoi or strtol for converting the command line strings into numbers.
    Lookup fopen for opening a file.
    Lookup fprintf for writing to a file.

    Feel free to post your code if you want more in...
  14. Replies
    4
    Views
    2,534

    Checkout ctype.h. It might make a few things...

    Checkout ctype.h. It might make a few things easier for you.
  15. Replies
    18
    Views
    6,675

    My final sentence qualifies that. My...

    My final sentence qualifies that.

    My confusion comes from trying to figure out where he got the 256 and 50/50 numbers from. For the 256, the only ways I could think of somebody coming up with...
  16. Replies
    18
    Views
    6,675

    Um, EOF is an int. So assuming an int is 32 bits,...

    Um, EOF is an int. So assuming an int is 32 bits, then wouldn't the percent chance of EOF showing up by default be (2^-32)(100)? This, of course, isn't taking into account how often programs store...
  17. Replies
    19
    Views
    14,419

    Look at line 15.

    Look at line 15.
  18. Replies
    5
    Views
    1,716

    while(juga!=1) juga is a function, not a...

    while(juga!=1)

    juga is a function, not a variable.

    Edit: Someone beat me to it! :)
  19. Replies
    9
    Views
    2,249

    When j == 0, you are NULLing the pointer. j ends...

    When j == 0, you are NULLing the pointer. j ends up being zero in two cases:

    1) On blank lines
    2) At the end of the file

    2 is true because of the order in which you do everything.



    No,...
  20. Replies
    5
    Views
    2,315

    Here's a few links I found on this subject....

    Here's a few links I found on this subject. (They're for Windows though)

    Writing directly to video memory? [Archive] - CodeGuru Forums
    OSDev.org • View topic - Writing to video memory, is...
  21. Replies
    9
    Views
    2,249

    Here are two problems I found with your function....

    Here are two problems I found with your function. Use this as your input text:



    So line one is blank and line two contains the character 'a'. There is no line 3. Here's what your code would do:...
  22. Replies
    9
    Views
    2,249

    I ran your getlist function and it seems to work...

    I ran your getlist function and it seems to work correctly. Could you show us where you free up everything? There might be an error there.
  23. Replies
    9
    Views
    2,249

    If realloc fails, you are guaranteed a memory...

    If realloc fails, you are guaranteed a memory leak since you're not using a temporary variable. That's probably why you're getting an out of memory error.
  24. Thread: Help

    by failure67
    Replies
    16
    Views
    3,515

    I won't do your homework for you, but I wrote a...

    I won't do your homework for you, but I wrote a program that does similar things to what your program needs to do. Read the comments and try to understand the code. Then modify it to your needs.
    ...
  25. Thread: Help

    by failure67
    Replies
    16
    Views
    3,515

    You should probably create a second topic for...

    You should probably create a second topic for this other program.

    Look at this piece of code by itself.


    char is_valid(char valid_y_n) {
    valid_y_n = tolower(valid_y_n); ...
Results 1 to 25 of 64
Page 1 of 3 1 2 3