Search:

Type: Posts; User: gregulator

Search: Search took 0.00 seconds.

  1. Replies
    4
    Views
    1,371

    Nevermind, I'm retarded. The 3rd character in...

    Nevermind, I'm retarded. The 3rd character in each set is an integer. And that integer can be greater than 9. Therefore, I can't just assume that each set is 3 characters.
  2. Replies
    4
    Views
    1,371

    string issue

    I programming in C++ on linux. I am trying to read 1 line of data from an input file and store it in a string. There are no spaces anywhere on the line. Because I had issues using a string and...
  3. Replies
    0
    Views
    4,697

    process ring

    I am writing a program that creates a logical ring of processes which utilizes pipes to pass a message around the ring. The ring consists of n process. The first process will pass a message to the...
  4. Replies
    1
    Views
    10,603

    binary tree of processes

    I am having trouble developing a program in C that will fork/create processes in the form of a binary tree. The idea is that the program takes in a command-line argument between 1 and 7, which...
  5. Replies
    2
    Views
    4,041

    redirecting stdout

    I'm trying to redirect stdout in the case of the append operator, ">>". When trying to open the correct file descriptor using the following line I get an error.

    fd[1] = open(output_file,...
  6. Replies
    5
    Views
    5,555

    if i was to pass the string "39num" to strtol(),...

    if i was to pass the string "39num" to strtol(), would that mean that it stops on the 'n' and returns 39 as the long int? or does it stop on the 'n' and return as a failure?

    possible scenarios:...
  7. Replies
    5
    Views
    5,555

    checking if a char * is an integer

    I have a line being read from the command line that contains 4 strings. The first is the command name, the second is supposed to be an integer value, the 3rd is the path to the source file, and the...
  8. Replies
    4
    Views
    3,353

    thank you very much prelude... i feel stupid now...

    thank you very much prelude... i feel stupid now that it was that simple, but i guess that's what happens after staring at your own code for hours on end
  9. Replies
    4
    Views
    3,353

    continued with code mentioned before

    This is from main:


    if(cmd == 1) //cat command
    {
    cat_arg = getArgument(args+1, cmdline); //get 1st argument
    //args is an int that starts at 0; args+1 represents the 1st...
    ...
  10. Replies
    4
    Views
    3,353

    NULL arguments in a shell program

    I have written a basic shell program that handles 3 commands: cat, cp, and cryptix for encrypting files. 'cat' and 'cp' act exactly as they do in any normal linux shell. 'cat' can take any number of...
Results 1 to 10 of 10