Search:

Type: Posts; User: nul

Page 1 of 3 1 2 3

Search: Search took 0.00 seconds.

  1. return x + y;

    return x + y;
  2. Replies
    8
    Views
    4,450

    Rogue user-space program.

    Rogue user-space program.
  3. Network scanners and cryptography are complicated...

    Network scanners and cryptography are complicated and complex subjects. First, concentrate on understanding the language.
  4. You never call your functions. Also, naming your...

    You never call your functions. Also, naming your variables the same as your functions is a less-than-great idea.
  5. Replies
    6
    Views
    1,421

    Consider other conditional operators.... Also...

    Consider other conditional operators.... Also there are other ways to "break" a loop, but I'm not sure if this has been covered yet in the book. Use your imagination. Other than the one logic error,...
  6. https://en.wikipedia.org/wiki/Shunting-yard_algori...

    https://en.wikipedia.org/wiki/Shunting-yard_algorithm
  7. Replies
    6
    Views
    803

    Although it compiles with a few warnings, the...

    Although it compiles with a few warnings, the printf("start") and printf("file opened") prints out fine for me on Debian.
  8. You should be so lucky! 9 out of 10 times I'm...

    You should be so lucky! 9 out of 10 times I'm forced to write Java on Windows, which is torture for a C/Linux fan. Ahhh, to each their own I guess :).
  9. A few remarks: 1. The initial question has in...

    A few remarks:

    1. The initial question has in fact been answered. The program does run on Linux as Salem has proven.
    2. You don't need the -lm flag when compiling as (from a quick glance at your...
  10. Thread: Spell Checker

    by nul
    Replies
    4
    Views
    1,011

    I would recommend checking 'c' for white space or...

    I would recommend checking 'c' for white space or semi-colon in your conditional statement for the while loop. In addition to checking for that in the while loop, you also need a counter to track how...
  11. Also take a look at inclusion guards.

    Also take a look at inclusion guards.
  12. Have you tried debugging yet?

    Have you tried debugging yet?
  13. Thread: Spell Checker

    by nul
    Replies
    4
    Views
    1,011

    Here's some logic for parsing words from your...

    Here's some logic for parsing words from your large string:

    1. Have a char buffer that is allocated the amount of memory for the max size of a word.
    2. Have a char pointer array that you can...
  14. Extremely informative. Thank you so much!!

    Extremely informative. Thank you so much!!
  15. Thank you for the very detailed...

    Thank you for the very detailed write-up/explanation along with code.

    I do have a question: would you mind explaining in a little more detail why/how this method of calculating t is so accurate?...
  16. So I haven't looked at this since my last post....

    So I haven't looked at this since my last post. Does anybody have a possible solution I could implement?

    I've thought of just calculating the exact value at pre-determined points using hard-coded...
  17. Thread: gdb problem

    by nul
    Replies
    6
    Views
    2,539

    The only issue I encounter is complaining about...

    The only issue I encounter is complaining about the lack of return type or value for the main function. Also your missing the "#" in front of include.
  18. Salem, thank you very much. What has me...

    Salem, thank you very much.

    What has me scratching my head is that the approximation comes out exactly as printed in the back of the book. So I use the double variable "t" as the parameter for...
  19. Mathematical Expression Produces Incorrect Result

    I've implemented the Euler method (Euler method - Wikipedia, the free encyclopedia), but what I'm actually having a problem with is evaluating the exact solution.

    The following is the mathematical...
  20. Replies
    11
    Views
    2,817

    You're still having the same issue of possibly...

    You're still having the same issue of possibly placing too many chars into your array. The situation of 9 non-newline chars, followed by a newline and a null byte.
  21. Replies
    11
    Views
    2,817

    And if you truly want to return the length of the...

    And if you truly want to return the length of the string, you include the newline in the count.
  22. Replies
    11
    Views
    2,817

    Your fgetline function reads in ten characters...

    Your fgetline function reads in ten characters and places them into your array. After this happens, you continue reading characters, but just discard them, UNLESS one is a newline. If it's a newline,...
  23. Replies
    11
    Views
    2,817

    Question: What happens when you try to read in...

    Question: What happens when you try to read in (fgetline) a string longer than MAXLINE?

    HINT: Not what you want to happen.

    Also, why are you using another variable in the for loop when the...
  24. Thread: Escape sequence

    by nul
    Replies
    4
    Views
    985

    When I enter a thread of someone asking for a...

    When I enter a thread of someone asking for a fully-baked answer, I escape the thread........ See what I did there?
  25. Replies
    8
    Views
    1,581

    As long as we're suggesting possible names, when...

    As long as we're suggesting possible names, when I discovered the naming conflict while working through K&R, I used the name fetch_line.....
Results 1 to 25 of 53
Page 1 of 3 1 2 3