Search:

Type: Posts; User: dtow1

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    9,155

    Ah! Thank you grumpy. That makes sense. So...

    Ah! Thank you grumpy. That makes sense. So I'll give lseek a shot.

    Thanks!
  2. Replies
    2
    Views
    9,155

    read() always returning 0 (not reading)

    I am playing around with the read(), write(), and open() system calls. I wrote a function to open/create 3 files, a function to write a test message to the files, and a file to read and print to the...
  3. Thank you Salem, my program is now working.

    Thank you Salem, my program is now working.
  4. Thank you for answering. Im not sure if I...

    Thank you for answering. Im not sure if I understand how to apply what you said though. The > has a higher precedence than the =. So the value of read_size is the result of read(..)>0.

    If I...
  5. Using read on tcp socket stream unable to exit loop.

    I am have written some code to send a file using TCP sockets in linux. On the receiving end I have the code fragment shown below. It works great and writes the file correctly, but since read blocks...
  6. Replies
    3
    Views
    1,098

    Thanks Ill take a look at utime()!

    Thanks Ill take a look at utime()!
  7. Replies
    3
    Views
    1,098

    change file information

    Hello,

    Using stat() you can retreive information about a file, is there a similar function to or way to set the values? If you modify a value in the stat structure that you populate, can you...
  8. Replies
    3
    Views
    1,143

    Hey, thank you for replying. Sorry to have...

    Hey, thank you for replying. Sorry to have wasted your time. I'm not sure why it worked when he did it but I've figured out what was happening. It was determining the maxlength for the current...
  9. Replies
    3
    Views
    1,143

    Formatted output %*s

    Hello,

    I am going through an example for a class and ran into something that is not working for me the same way as it did for the professor when he demonstrated it.

    He use:


    printf(%*s...
  10. Thread: Stack Smashing

    by dtow1
    Replies
    7
    Views
    2,015

    Thanks for the reply. That is very interesting...

    Thanks for the reply. That is very interesting stuff. Its so fascinating what consequences there can be to something that seems so small. So is there ever any reason to use a function like gets()...
  11. Thread: Stack Smashing

    by dtow1
    Replies
    7
    Views
    2,015

    Thank you both for answering, I definitely do not...

    Thank you both for answering, I definitely do not want to violate the rules of the forum. It was just a thought that popped in my head when fiddling around. Thanks for replying.
  12. Thread: Stack Smashing

    by dtow1
    Replies
    7
    Views
    2,015

    Stack Smashing

    Hello. I was playing around with gets(), specifically because its supposed to be insecure. The program accepts a string of 5 chars, and is only there for me to be able to play with what happens...
  13. Replies
    3
    Views
    1,525

    Yep

    Yep, that did it. Thank you very much.
  14. Replies
    3
    Views
    1,525

    IO Redirect error.

    I created a program to count the number of characters in a file, it compiles fine and is a really basic program. When I go to redirect a text file to the program I get an error. chrcnt is the...
  15. Replies
    5
    Views
    3,268

    Thank you Tater. Ill look up fscanf() and see if...

    Thank you Tater. Ill look up fscanf() and see if I can get a better grip on this. I appreciate the information.
  16. Replies
    5
    Views
    3,268

    Thank you for the reply. That does make sense...

    Thank you for the reply. That does make sense that I would need to work with the data for anything to change. Do you have any information as to why it would get larger? I keep reading that writing...
  17. Replies
    5
    Views
    3,268

    writing binary file

    Hello,

    I am working with file I/O at the moment. I am attempting to read in numbers from an ascii file and then write them to a binary file. My program is opening the ascii file correctly, and...
  18. Thanks

    Thank you both for your replies.
  19. Address off when returning pointer from function.

    Hello,

    I am writing a program for the problem: Write a function that receives a string, and returns a pointer to the first non space character in the string.

    I could do it more simply by just...
Results 1 to 19 of 19