Search:

Type: Posts; User: jwroblewski44

Page 1 of 12 1 2 3 4

Search: Search took 0.01 seconds; generated 31 minute(s) ago.

  1. Well once I went through and changed all the...

    Well once I went through and changed all the int's to long's, the program gave all the correct outputs. The issue was that I neglected to replace the int's used for the counters in the for loops.
    ...
  2. @nonpuz I spoke with my department chair(he...

    @nonpuz

    I spoke with my department chair(he was a judge during the comp) and he gave me the test cases for the problem. When I have some free time ( thanksgiving break? ), I'm going to check test...
  3. Yes. I agree that writing my own sort was not the...

    Yes. I agree that writing my own sort was not the best approach. Simply, I don't have much experience using the standard system sorts, but I did have access to a book with a sort method I was...
  4. @grumpy If you could be more specific as to...

    @grumpy

    If you could be more specific as to how I'm failing to do what the program asked.

    From the last paragraph of the description:
    "Your team is to write a program to assist the director...
  5. ACM Programming Contest.... Seeking Answers!

    Hello, all!

    First off, this is program from the ACM programming contest, of which today I and two teammates competed. We managed to solve two of nine correctly, but sadly the two programs I was...
  6. Replies
    2
    Views
    1,789

    Thank you.

    Thank you.
  7. Replies
    2
    Views
    1,789

    strdup() and execvp()

    I am working on an intro to OS book and have some questions about this code:



    #include <stdio.h>
    #include <stdlib.h>
    #include <unistd.h>
    #include <string.h>
    #include <sys/wait.h>
  8. Replies
    6
    Views
    1,456

    So when I have a string in quotes, there is an...

    So when I have a string in quotes, there is an implied null byte at the end?
  9. Replies
    6
    Views
    1,456

    Fairly Simple Char Array Question

    I'm not understanding why the string provided for initialization is too long?



    int main()
    {
    char array[1] = "A";


    return 0;
  10. Thank you laserlight. That makes sense. Otherwise...

    Thank you laserlight. That makes sense. Otherwise the contents of the array would be alterable, right?
  11. Wrong return type when returning char array as pointer

    I am writing a class Player which has several char arrays as private fields. I am trying to write a method which returns an array as a pointer, but doesn't alter the array in any way, thus the const....
  12. Replies
    9
    Views
    2,647

    Well I am not sure what UART is, but this is...

    Well I am not sure what UART is, but this is wrong:



    *(unsigned int*) AHB_LED_BASE = 0x55; //wrong
    ...
    *(unsigned int*) AHB_LED_BASE = 0xAA; //wrong


    The define preprocessor command...
  13. Replies
    5
    Views
    1,724

    Thanks. More reading on streams is definitely...

    Thanks. More reading on streams is definitely required.
  14. Replies
    5
    Views
    1,724

    So if I'm understanding correctly, the return...

    So if I'm understanding correctly, the return value of getline is a boolean value, which is the opposite value of std::basic_ios::fail. And std::basic_ios::fail returns true if eofbit is set, and...
  15. Replies
    5
    Views
    1,724

    Yet Another Getline Question

    Sorry to rehash old topics, but I couldn't find a relevant post to my question. I have smashed together some code that does what I want, but I'm not quite sure why. The problem I'm trying to solve is...
  16. Address space layout randomization - Wikipedia,...

    Address space layout randomization - Wikipedia, the free encyclopedia

    I would say that grumpy's original idea would be best.
  17. Replies
    18
    Views
    3,540

    It's not meant to be robust, just an example. But...

    It's not meant to be robust, just an example. But thanks for pointing that out.
  18. Replies
    18
    Views
    3,540

    Here is a sample program using a linked list....

    Here is a sample program using a linked list. Note that the most basic of operations have been given their own functions.

    linkedlistop.h


    // linkedlistop.h


    struct node
    {
  19. Replies
    18
    Views
    3,540

    Memory management is key to using C, so it...

    Memory management is key to using C, so it shouldn't be shrugged off. Do research on the tool Valgrind, and use it.

    Don't forget; all dynamic memory allocated MUST be free'd by the programmer to...
  20. Could you tell us what algorithm you're using?

    Could you tell us what algorithm you're using?
  21. Replies
    18
    Views
    3,540

    Always check the returned pointer from malloc to...

    Always check the returned pointer from malloc to check for failed allocation.
    Also I would modify it so you can search for a particular value, rather than just showing the last element.
    Your...
  22. Replies
    22
    Views
    2,506

    edit: didn't read entire thread

    edit: didn't read entire thread
  23. Were you planning on using C or C++? This...

    Were you planning on using C or C++?

    This seems best suited for C++, but I found a link on stack overflow that might be of use if you demand good ol' C: oop - How can I simulate OO-style...
  24. Replies
    8
    Views
    2,406

    If you ask me, your solutions simplicity is a...

    If you ask me, your solutions simplicity is a good thing. With small programs like this, moving a one liner into a function is simply a matter of preference. But when your code portions start to...
  25. Replies
    8
    Views
    2,406

    im sorry, you are correct.

    im sorry, you are correct.
Results 1 to 25 of 295
Page 1 of 12 1 2 3 4