Search:

Type: Posts; User: mercuryfrost

Search: Search took 0.01 seconds.

  1. Replies
    14
    Views
    9,236

    Fixed! Thanks! Sorry about that. I've put...

    Fixed! Thanks!



    Sorry about that. I've put them all into their own functions now



    Totally right... lesson learned.
  2. Replies
    14
    Views
    9,236

    Changes (attempted!) made! Thanks guys for...

    Changes (attempted!) made!

    Thanks guys for your time!




    #include <stdio.h>
    #include "list.h"
    #include <stdlib.h>
  3. Replies
    14
    Views
    9,236

    Many thanks for feedback Tabstop and Salem. ...

    Many thanks for feedback Tabstop and Salem.

    I've attemtped to implement the changes you suggested, but was unsure of where or how to implement the two mentioned above.

    The current...
  4. Replies
    14
    Views
    9,236

    I did say it was 'terrible, ignorant' code. :) ...

    I did say it was 'terrible, ignorant' code. :)

    Ya, I guess stupid syntax errors are my first problem... amongst many.

    If I could make it compile I would. I'm very new to C, and I apologise...
  5. Replies
    14
    Views
    9,236

    Linked List from Standard Input

    Hi all,

    for any of you who shiver at ignorant, terrible code, just press 'back' now.

    Assignment where I have to use a header and .c file to implement an abstract data type for lists containing...
  6. Replies
    7
    Views
    4,471

    I think I had already changed that when you had...

    I think I had already changed that when you had posted.

    Did I?

    Or is it this you're referring to?

    infp = open(argv[j], O_RDONLY);

    If that won't work, any suggestions?
  7. Replies
    7
    Views
    4,471

    Ah okay, Changes made. Still the same problem...

    Ah okay,
    Changes made.

    Still the same problem persists. The input files input isn't being read

    I think the problem is with the read statement...

    Tidied a bit
  8. Replies
    7
    Views
    4,471

    Well I thought that O_CREAT would create the file...

    Well I thought that O_CREAT would create the file and open it. Or just open it if it already exists.

    O_APPEND wouldn't open it if the file didn't exist would it?

    Well that was my thinking...
  9. Replies
    7
    Views
    4,471

    open read write close

    As a progression from the first thread,
    which was solved, using fread fscanf fprintf and fclose
    (http://cboard.cprogramming.com/c-programming/118778-fscanf-seg-fault.html)

    I'm trying to write...
  10. Replies
    19
    Views
    3,624

    @ Tabstop, that doesn't seem to work either. ...

    @ Tabstop, that doesn't seem to work either.

    Actually, since it's a different problem,
    I'll start a new thread.

    The original issue in this thread was solved with all of your help, thanks!
  11. Replies
    19
    Views
    3,624

    @tabstop. That seems to open a man for other...

    @tabstop.

    That seems to open a man for other things.
    Open gives man page for openvt, write for messages to users etc...


    As regards the program above,
    It seems to be compiling fine and...
  12. Replies
    19
    Views
    3,624

    It's another part of the assignment. Most...

    It's another part of the assignment.

    Most stuff online seems to be giving out that open etc aren't real C, rather than telling me how to use them compared to the others!

    I'm working through the...
  13. Replies
    19
    Views
    3,624

    @ Tabstop Yep, well as I said, this is my...

    @ Tabstop

    Yep, well as I said, this is my first go at C
    Embarrassment is secondary to learning! :)


    Okay...

    Not sure what I changed to make it work, but with a few little changes this code...
  14. Replies
    19
    Views
    3,624

    Must use fscanf unfortunately. Also, What do...

    Must use fscanf unfortunately.

    Also, What do you mean by OOPS tabstop?
  15. Replies
    19
    Views
    3,624

    OKay, Well it's compiling again, but I'm back...

    OKay,
    Well it's compiling again,
    but I'm back to having a seg fault

    Is there perhaps a more standard way to run through an undefined number of arguments? This was just what I thought up.

    I...
  16. Replies
    19
    Views
    3,624

    GCC first with pedantic, then without, same error

    GCC
    first with pedantic, then without, same error
  17. Replies
    19
    Views
    3,624

    Thanks for the answers guys. With the argv[j],...

    Thanks for the answers guys.

    With the argv[j],
    I was trying to increment the value of 'j' to go through all the arguments until i was 0.

    I've tried to add an error check to see if fopen...
  18. Replies
    19
    Views
    3,624

    fscanf seg fault

    Hi all,

    BRAND new to programming in C.. in fact this is my first real program.

    I have an assignment I've been trying to complete and I'm getting an error (seg fault) I was hoping someone could...
Results 1 to 18 of 18