Search:

Type: Posts; User: bluebob

Search: Search took 0.01 seconds.

  1. Replies
    8
    Views
    1,241

    the files are opened using 'r', and closed using...

    the files are opened using 'r', and closed using 'w'.

    The data is written correctly,

    mem1
    Blue Bob
    C Board
    0

    But when it is read back in, and printed out, a new line is taken after each...
  2. Replies
    8
    Views
    1,241

    well it dont seem to work. The data is written...

    well it dont seem to work. The data is written correctly, but when it is read in, it is not firmatted properly. Their are massive gaps between fields, and some data is not displayed. This has been...
  3. Replies
    8
    Views
    1,241

    file reading problems again

    Ive tried using fgets and fscanf, but neither recognise a spaces, they regard them as being the end of the input.

    Are there anything else i can use? Below is a copy of one of my read in lines.
    ...
  4. Replies
    9
    Views
    2,068

    If i use a memory dump i will lose marks! Thats...

    If i use a memory dump i will lose marks! Thats why i didnt use it.

    I will try to use the one function to read from now on though.

    BlueBob
  5. Replies
    9
    Views
    2,068

    Here ya go, an example of a typical members file....

    Here ya go, an example of a typical members file.
    Whats wrong with using feof? i was told on this board to use it!

    BlueBoB

    mem1
    Scott Harkins
    South Cobberville
    0
    mem2
  6. Replies
    9
    Views
    2,068

    Why does this not read in correctly?

    The data is written correctly to the external file. In the correct order and format. But when read back in, the format is changed, and the data is not displayed correctly. Is their something wrong...
  7. Replies
    19
    Views
    3,223

    Ahh, ive jus read in the book that fscanf does...

    Ahh, ive jus read in the book that fscanf does not recognize space's. So i have to use fgets()?

    How would i change this-
    fscanf (memberRead, "%s\n", MemberData[counter1].membernumber);

    to use...
  8. Replies
    7
    Views
    1,540

    Deleting data from a structure?

    I have a stucture of arrays that holds data such as member number, videonumber,and rental date.

    How would i go about deleting from the structure one of these records?

    BlueBob
  9. Replies
    19
    Views
    3,223

    I can now write correctly to the external files....

    I can now write correctly to the external files. But when i read the data back in to the program, it does not seem to recognize spacing? is this something to do with the use of fscanf?

    any ideas?...
  10. Replies
    19
    Views
    3,223

    Why wont the files read in?

    I can open the files, and add to them. They are written to correctly, But when i re-run the program, the files are not read in, Any ideas why?

    extern int m; // number of members
    extern int i; //...
  11. Replies
    19
    Views
    3,223

    Ive amended my code, and now it does not crash...

    Ive amended my code, and now it does not crash (apart from when writing video data to the video external file.

    But, when i re-run the program, none of the data is read in. The program runs...
  12. Replies
    19
    Views
    3,223

    No, three different files. Cheers Shiro. It...

    No, three different files.

    Cheers Shiro. It was a problem with my account, not yours, sorry. I sorted it.

    BlueBob
  13. Replies
    19
    Views
    3,223

    shiro, your hotmail address is being rejected. Do...

    shiro, your hotmail address is being rejected. Do you have an alternative address?

    BlueBob
  14. Replies
    19
    Views
    3,223

    Heres my code to open the files, and which also...

    Heres my code to open the files, and which also calls the functions to read in the data. You say i should use a while loop to read up until the eof, how would i add add this? Also, is the option ==...
  15. Replies
    19
    Views
    3,223

    I'v tried what you have suggested, but it doesnt...

    I'v tried what you have suggested, but it doesnt seem 2 have sorted the problem.

    I think the problem is with the reading of the data from the files. The action memberRead, videoRead, and...
  16. Replies
    19
    Views
    3,223

    Having some trouble with reading from files

    At the top and bottom of main() i have (respectivly)

    openFiles('r');
    readDataFromFile();
    closeFiles('r');

    and

    openFiles('w');
    writeDataToFile();
  17. Replies
    1
    Views
    1,109

    My Bubble Sort, help

    This sort seems to work the first time it is run, but if i run it a second time, it sorts the array in the opposite direction, and so on. Any ideas?

    for (j = 0; j < i - 1; j++)
    for (x = i -...
  18. Replies
    6
    Views
    1,043

    Sorting aphabetically?

    I am trying to sort an array of structures alphabetically. Can this be done?

    if yes, how? I can only find sorts that organise numerically. Any help would be appreciated.

    Blue Bob
  19. Replies
    7
    Views
    5,651

    Sorting an array alphabetically?

    I am using structures of arrays, and one of the arrays holds football teams. I want to organise the data alphabetically, and have it displayed. Can this be done?
  20. Replies
    7
    Views
    4,733

    Help. I just cant this code to work. I can enter...

    Help. I just cant this code to work. I can enter the data into the array, and i know its there, because i can display all items in the structure of arrays, and it displays everything fine.

    But...
  21. Replies
    7
    Views
    3,302

    We have been told to use bubble sort, as it is...

    We have been told to use bubble sort, as it is the easiest (his words, not mine).

    How would i implemenet a qsort on an structure of arrays anyway?
  22. Replies
    7
    Views
    4,733

    bubble sort and structures?

    This bubble sort isnt working for me, any ideas? Im trying to sort a structure of arrays by one variable in structure. Im trying to sort by videocat.


    for (j = 0; j < i - 1; j++)
    for (x = i...
Results 1 to 22 of 22