Search:

Type: Posts; User: jimblumberg

Page 1 of 20 1 2 3 4

Search: Search took 0.03 seconds.

  1. 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...
  2. Replies
    5
    Views
    201

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

    No.


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

    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...
  4. 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...
  5. 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...
  6. Replies
    3
    Views
    236

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

    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...
  8. Replies
    15
    Views
    526

    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.
  9. Replies
    15
    Views
    526

    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...
  10. Replies
    5
    Views
    354

    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?
  11. Replies
    8
    Views
    414

    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...
  12. Replies
    8
    Views
    414

    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' ){...
  13. 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.
  14. 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...
  15. Replies
    17
    Views
    807

    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...
  16. Okay so where did you allocate memory for that...

    Okay so where did you allocate memory for that pointer?

    Also please don't edit your post to answer questions, post the new information in another post in the topic.
  17. My first question is: What is a String? Why...

    My first question is: What is a String?

    Why are you trying to write to a file that was opened in read mode?
  18. Replies
    5
    Views
    384

    It looks like you need an array of a struct to...

    It looks like you need an array of a struct to hold the information.The struct would have variables of the correct types for your data.
  19. For starters, global variables are usually...

    For starters, global variables are usually considered a bad practice, learn to pass those variables to and from the functions that need them.

    Initialize your variables when you declare them. And...
  20. Unless you're talking about a static or global...

    Unless you're talking about a static or global variable, not all compilers will initialize your variables in debug mode. Static and global variables are always default initialized.
  21. Or stick the code in a function.

    Or stick the code in a function.
  22. Replies
    2
    Views
    673

    The order matters. If the stream enters a fail...

    The order matters. If the stream enters a fail state no further processing of that stream can occur until the errors are cleared. This means that the clear() must be the first thing done.
  23. Replies
    3
    Views
    468

    What compiler/IDE are you using? It looks like...

    What compiler/IDE are you using?

    It looks like your compiler can't find the header file lib_string.h. Does the file exist? If it does exist where exactly is it located? Is it in the same directory...
  24. Replies
    4
    Views
    526

    Also please note that "stdlib.h" and "stdio.h"...

    Also please note that "stdlib.h" and "stdio.h" are header files, not libraries. These headers describe functions contained in the standard library.



    I'm not aware of any easy way to make a user...
  25. Did you even bother to read the previous posts? ...

    Did you even bother to read the previous posts?

    Also if you're getting an error you probably need to update your compiler and make sure it is using one of the modern standards.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4