Search:

Type: Posts; User: Sethiorth

Search: Search took 0.01 seconds.

  1. Replies
    4
    Views
    4,929

    Yeah, but no guarentee that you free it after the...

    Yeah, but no guarentee that you free it after the child is all done with it, unless I'm jsut not thinking straight due to lack of sleep. But real close to what I came up with. It really helped to...
  2. Replies
    4
    Views
    4,929

    No, execvp overwrites the program on the stack...

    No, execvp overwrites the program on the stack with the command it was given.

    execvp(cmd, args); // This runs.
    fprintf(stderr, "Error, execvp failed."); // This line never runs, unless the...
  3. Replies
    4
    Views
    4,929

    Memory freeing after exec call?

    This is for a school project, and I am looking for guidence on going about freeing memory of a parameter to an exec call. This isn't the point of the project, just a detail I am stuck on planning...
  4. Glad that could help. I think I found it from...

    Glad that could help. I think I found it from here, what I use for c/c++ reference:

    http://www.cppreference.com/

    Under C++ I/O. Essentially its a stream pointer that was pointed to the end of...
  5. Then he would have a problem. I am sorry, was...

    Then he would have a problem. I am sorry, was jsut trying to give him another option for getting information from a file. And yes, I know my code had the same problem, but the current version of the...
  6. Here's how I did it for a client/server program....

    Here's how I did it for a client/server program.


    // Start file access.
    ifstream infile (largeBuffer, ifstream::binary);
    // Get file size.
    infile.seekg(0,ifstream::end);
    int...
  7. Replies
    2
    Views
    1,257

    Thanks. Guess I need to get better at formatting...

    Thanks. Guess I need to get better at formatting google searches. I looked for "c++ stl map using" and it returned a lot of message board posts.

    Thanks again, the tutorial you pointed to answered...
  8. Replies
    2
    Views
    1,257

    Using the map STL

    I have a homework problem dealing with coding the 0-1 knapsack problem greedily and dynamically. I am to use the map STL for the dynamic implimentation, but am not familiar with it. I am looking for...
Results 1 to 8 of 8