Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. Replies
    4
    Views
    196

    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...
  2. 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.
  3. 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.
  4. 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?
  5. 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.
  6. 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...
  7. 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.
  8. 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?
  9. 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.
  10. 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.
  11. 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...
  12. Replies
    5
    Views
    355

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

    No.


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

    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...
  14. 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...
  15. 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...
  16. Replies
    3
    Views
    329

    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.
  17. Replies
    15
    Views
    867

    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...
  18. Replies
    15
    Views
    867

    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.
  19. Replies
    15
    Views
    867

    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...
  20. Replies
    5
    Views
    465

    Well what have you tried? What would be the...

    Well what have you tried?

    What would be the purpose of the desired function?

    What have you done other than post this question to research the problem?
  21. Replies
    8
    Views
    548

    Not really, but the stated issues are probably...

    Not really, but the stated issues are probably the biggest issues. For example main() should return an int, not void, and you have several unused variables in main() that your compiler should also be...
  22. Replies
    8
    Views
    548

    char formato(){ // to validate the eBook format...

    char formato(){ // to validate the eBook format
    char f;

    printf("Formato do eBook?");
    f = toupper(getchar());

    while( f!= 'ePUB' || f != 'mobi' || f != 'pdf' || f != 'outros' ){...
  23. Replies
    7
    Views
    1,004

    What don't you understand? If you const...

    What don't you understand?

    If you const qualify a class member function that function can't modify any class member variable. The kind and number of parameters don't matter.
  24. Replies
    7
    Views
    1,004

    Well actually all three forms are invalid because...

    Well actually all three forms are invalid because of the leading const without a type.

    The last two are only valid with class member functions. They both inform the compiler that neither of those...
  25. Replies
    17
    Views
    1,206

    Also what is the purpose of checking if the array...

    Also what is the purpose of checking if the array is sorted?

    If it is not sorted will you need to sort the array?

    If the array is not sorted in the correct way, will you need to sort the...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4