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...
Type: Posts; User: KingKush
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...
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...
I wasnt exactly sure what fixed the problem other than adding a \n to the output
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...
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...
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...
Ohhhhh wow. Now i see it. Thank you so much! the code now works!
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...
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...
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;
...
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");
...
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...
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...
@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]...
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...