Search:

Type: Posts; User: KingKush

Search: Search took 0.01 seconds.

  1. just in case you still need help here is the c++...

    just in case you still need help here is the c++ solution using a while loop. C++ and C are similar so it may help you find a solution. I would have done it in C but i thought this would be a more...
  2. Ohhh i see. The nested while loops were throwing...

    Ohhh i see. The nested while loops were throwing me off when i tried to write that portion because i still wanted to keep my for loop despite while loops making more sense. Thank you for linking...
  3. I wasnt exactly sure what fixed the problem other...

    I wasnt exactly sure what fixed the problem other than adding a \n to the output
  4. using signals to pause and unpause a program via terminal

    I'm writing a program that counts down from a user desired number. it should pause when ctrl-c is pressed and terminated when ctrl-\ is pressed. I cant seem to get it to pause or countdown. Im new to...
  5. I looked it up and attempted to implement it but...

    I looked it up and attempted to implement it but i still had no output. Only way i got output was at the end of the program all at once. Here is the code ive added. I've commented out the things ive...
  6. Countdown Program not displaying anything in terminal.

    Im having strange issues. I got my code to display the countdown all at once but once i added sleep(1) it no longer worked. (had to add unistd.h due to conflicting types for sleep) when i tried to go...
  7. Replies
    4
    Views
    6,164

    Ohhhhh wow. Now i see it. Thank you so much! the...

    Ohhhhh wow. Now i see it. Thank you so much! the code now works!
  8. Replies
    4
    Views
    6,164

    The code i had is very similar to yours. Can you...

    The code i had is very similar to yours. Can you point out where i messed up? Also the program im writing assumes you are already in the desired directory. You are given an inode number and want to...
  9. Replies
    4
    Views
    6,164

    unable to find file from inode

    The code I'm using works fine however when i get to my while loop to search the directory i cant seem to find the file based on its inode. I check to see what it is in terminal (ls -i) and then...
  10. Replies
    8
    Views
    7,605

    I have also implemented status which printed...

    I have also implemented status which printed "code should work" so im not sure where my program is going wrong


    //Owner - Read

    //To see if permissions have changed
    int statusCheck;
    ...
  11. Replies
    8
    Views
    7,605

    I altered my program to test its success and it...

    I altered my program to test its success and it does print it so should it have worked?

    //Owner - Read
    char r[5] = "r";
    if(strcmp(r, newPerm) == 0)
    {
    printf("r");
    ...
  12. Replies
    8
    Views
    7,605

    File Permissions will not change

    I have written a program to change the permissions for a file however whenever i run the code it doesnt change the permissions when i use the ls -l command in terminal to see if the change has...
  13. 1. prompt user to input desired content 2....

    1. prompt user to input desired content
    2. create the necessary variables
    3. scan the user input and place in designated variables.
    4. Using printf display the content in their own lines. (\n will...
  14. @john.c Thanks sooo much for your help! From your...

    @john.c Thanks sooo much for your help! From your code i was able to decipher what went wrong with my code. When i was assigning the filename i was out of bounds in the argv array(I used argv[2]...
  15. How to read only the first 5 Lines from a file and segmentation error 11

    I have 2 questions. For some reason I am getting a segmentation error and I cant figure out why. I'm new to C programming so it may be obvious but I could not find anything in my program. Here is the...
Results 1 to 15 of 16