Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.07 seconds.

  1. Replies
    4
    Views
    137

    Well part of the reason for the current problem...

    Well part of the reason for the current problem is that memcpy() expects "destination" to be passed by "reference" not by "value". However where are you allocating memory for those pointers in your...
  2. Correct. Sort of. But this has nothing to...

    Correct.


    Sort of. But this has nothing to do with the arguments to main(), since the arguments of main() are not constants, they are variables.

    And you need to realize that C passes...
  3. Is there a reason you're parsing that first line?...

    Is there a reason you're parsing that first line? It might be easier to just read the first line and then discard it.

    Also are you sure your file has tab characters within it? The "file" you...
  4. Replies
    27
    Views
    1,259

    Well both of these chips can probably be replaced...

    Well both of these chips can probably be replaced with a simple micro-controller.


    Decoding a 4x4 matrix keyboard is also fairly easy to decode with a simple micro-controller. IMO, it's trickier...
  5. Replies
    27
    Views
    1,259

    If your microprocessor is no longer obtainable...

    If your microprocessor is no longer obtainable you will probably need to update the rest of the chips you mentioned. Depending on the purpose of that embedded system it may be easier to go with...
  6. Replies
    27
    Views
    1,259

    No matter what it will probably be a combination...

    No matter what it will probably be a combination of pushing forward and starting over. Most of your initialization functionality will probably require total rewrite because of the new processor, also...
  7. Replies
    4
    Views
    514

    What do you mean by "isn't working"? What do...

    What do you mean by "isn't working"?

    What do you expect to happen?

    What exactly are you trying to do on line 6?

    Do you know that for most current systems a char is a signed value, meaning...
  8. Yes. Remember that function parameters all but...

    Yes. Remember that function parameters all but the last array subscript of an array must utilize a compile time constant size.
  9. Are you sure? VLA are only truly supported in...

    Are you sure? VLA are only truly supported in C99, in C11 VLA use is an optional feature, not all compilers support the use of VLA when using the current standard.
  10. Please answer the first two questions I posted. ...

    Please answer the first two questions I posted.




    You have infinite recursion so your stack overflows and the program crashes, so what is your main question?
  11. Exactly what do you expect to overflow? Why...

    Exactly what do you expect to overflow?

    Why would you expect it to run until it "overflows"?

    You're probably blowing away your stack with all the recursive calls.
  12. Please post a small sample of your input that...

    Please post a small sample of your input that actually matches your structure. For example it appears, from the criarficha() that the first field is a string but your file has an int as the first...
  13. Please post a small sample of your input file, 10...

    Please post a small sample of your input file, 10 lines or so should be adequate.

    Also you need to post a complete program.
  14. Show what you've tried, your latest complete...

    Show what you've tried, your latest complete program.

    Why the switch to fgets()?

    What do you think fread() brings to the table?
  15. As I have already hinted at, you either need to...

    As I have already hinted at, you either need to change your fscanf() call to match the data in your file, or change the data in the file to match your fscanf() call.
  16. Your fscanf() call doesn't match the data in the...

    Your fscanf() call doesn't match the data in the file, which will cause problems.
  17. It looks like either you're ignoring your...

    It looks like either you're ignoring your compiler's warnings/errors or you have a defective compiler.

    Here is what my compiler says about your code:



    You need to see about fixing these...
  18. Replies
    5
    Views
    470

    No. No, char, short, long, are in bytes, a...

    No.


    No, char, short, long, are in bytes, a byte is 8 bits.
  19. Replies
    8
    Views
    742

    Why all the horrible global variables? You really...

    Why all the horrible global variables? You really need to learn to properly pass the required variables to and from your functions.

    Why is the sort function trying to read from the file, shouldn't...
  20. Well you may want to start by allocating an array...

    Well you may want to start by allocating an array large enough to hold the contents of your concatenated strings, and passing the correct capacity value (probably the size of one of the arrays, not...
  21. Well you are definitely overflowing your...

    Well you are definitely overflowing your destination array.

    You are also passing a "cap" variable to your function that is larger than either of your arrays, s[] has a size of 33 and buff has a...
  22. Replies
    3
    Views
    440

    Where and how are you allocating memory for mssg?...

    Where and how are you allocating memory for mssg?



    I don't see any line three, so I don't have a clue.
  23. Replies
    15
    Views
    1,089

    Well in several places you are casting the return...

    Well in several places you are casting the return value to the wrong type, for example a char instead of a char*. Since you use a cast the compiler is free to deduce that you know what you're doing...
  24. Replies
    15
    Views
    1,089

    Do you know what casting means and how it's done...

    Do you know what casting means and how it's done in C?

    This contains a cast of the return value of malloc(): wordArray = (char*) malloc(10), note the highlight.
  25. Replies
    15
    Views
    1,089

    Stop casting the return value of malloc, you are...

    Stop casting the return value of malloc, you are causing several errors with those casts.

    Next what do you think (wordArray + x) is actually accomplishing?

    Why aren't you using "normal" array...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4