Search:

Type: Posts; User: scott1990

Search: Search took 0.01 seconds.

  1. Replies
    47
    Views
    5,522

    Yes this is the code i am using, thanks for your...

    Yes this is the code i am using, thanks for your help btw
  2. Replies
    47
    Views
    5,522

    I've tried your suggestion KBriggs but no matter...

    I've tried your suggestion KBriggs but no matter what i enter it just says "The title you entered does not exist please re-enter" and it just keeps looping through that.
  3. Replies
    47
    Views
    5,522

    Hi KBriggs i have made your changes but i just...

    Hi KBriggs i have made your changes but i just feel i've not entered it correctlycan you look over it please.



    while (!flag)
    {
    while (fread(&tmp,sizeof(record_structure),1,record_file)) {...
  4. Replies
    47
    Views
    5,522

    It does print the cue for the cursor to re-enter...

    It does print the cue for the cursor to re-enter but when i type in an existent title it doesnt show anything, just goes to a newline.
  5. Replies
    47
    Views
    5,522

    Hey MK27 i've placed the flag into my code but...

    Hey MK27 i've placed the flag into my code but when i type a non existent title in it just does nothing basically :S, also in your last post you've put this in the corner of your code [. . . .] what...
  6. Replies
    47
    Views
    5,522

    The search is working great now MK27 thanks....

    The search is working great now MK27 thanks. Regarding fflush(stdin) my lecturer does use this but he isnt the most experienced C user (his words) so i think i should include it to make him happy.
    ...
  7. Replies
    47
    Views
    5,522

    The search option isnt letting me type in any...

    The search option isnt letting me type in any input, it produces the 8 records instead.

    Here's what it looks like:

    http://i45.tinypic.com/14iisep.jpg

    Oh and i spoke to my lecturer today and...
  8. Replies
    47
    Views
    5,522

    Wow thanks for all that MK27 much appreciated. I...

    Wow thanks for all that MK27 much appreciated. I was stumped on why when it displayed all records it was like that but thanks for explaining. Now i notice you say that the search now works for you...
  9. Replies
    47
    Views
    5,522

    This is what i've got so far MK27 #include...

    This is what i've got so far MK27



    #include <stdio.h>
    #include <string.h>
    #include <stdlib.h>
    #define SIZE 30
    /* global variables */
    typedef struct
  10. Replies
    47
    Views
    5,522

    Well i've compiled that code(thanks for your...

    Well i've compiled that code(thanks for your time) with no errors but when i press option 3 to get into it it just stays on the menu screen which is confusing as i dont know why thats happening.
    ...
  11. Replies
    47
    Views
    5,522

    Hi whiteflags thanks for your input, ive took...

    Hi whiteflags thanks for your input, ive took away '&' from the scanf but when i compile it still does the same thing, it only asks for the user to enter the title and when i do nothing happens.
  12. Replies
    47
    Views
    5,522

    Luckily for me the rest of the program compiles...

    Luckily for me the rest of the program compiles and works(not great but its passable).
    I've compiled this but all it does is ask me to enter the title and nothing else so im on the losing path here...
  13. Replies
    47
    Views
    5,522

    Is tmp some sort of function? MK27 ...

    Is tmp some sort of function? MK27


    record_structure tmp;
    [...put title to search for into a string named "wanted"...]
    while (fread(tmp, sizeof(record_structure), 1, record_file)) {
    if...
  14. Replies
    47
    Views
    5,522

    Basically just the same as before struggling with...

    Basically just the same as before struggling with the searches, just cant seem to get it at all even with MK27's help. My latest code is in my first post.
  15. Replies
    47
    Views
    5,522

    Im not seeing how this is gona fit into my...

    Im not seeing how this is gona fit into my program MK27, its confusing me, i just dont get it . It must be a bit too advanced for me but thanks for your help.
  16. Replies
    47
    Views
    5,522

    Would this be what mine would look like ?? ...

    Would this be what mine would look like ??



    char searchtitle[SIZE];
    while (fgets(searchtitle,SIZE,record_file) != NULL) {
    /* extract per line data */
  17. Replies
    47
    Views
    5,522

    Thanks for your reply MK27 and sorry for breaking...

    Thanks for your reply MK27 and sorry for breaking the boards policy i should have read it before i posted my bad.

    Regarding your last suggestion, i know how to open the file but i don't know how...
  18. Replies
    47
    Views
    5,522

    Something like this ??? { record_file =...

    Something like this ???



    {
    record_file = fopen("C:\\bookfile.bin","rb");

    system("cls");

    printf ("Please enter the title of the book you are searching for: ");
  19. Replies
    47
    Views
    5,522

    Can someone please help deadline tomorow

    I need to implement two searches into this program, a search for an ISBN and a search for a title but i have no idea how to,o can someone please do it for me or set me off in the correct direction???...
  20. Replies
    5
    Views
    1,487

    Am I on the correct path with this noobiept? ...

    Am I on the correct path with this noobiept?



    char isbn_number[20]

    void main()
    {
    printf("Please enter ISBN number: ");
    fflush(stdin);
  21. Replies
    5
    Views
    1,487

    He hasn't given us a book yet but he has given us...

    He hasn't given us a book yet but he has given us a sample string compare program
    but i really don't know where to start off.



    /* Sample string comparison program*/
    /* Stored in Samples Drive...
  22. Replies
    5
    Views
    1,487

    Search function

    Hi guys this program needs to have two options, one where the user enters an ISBN number and then it displays the book which has the ISBN number the user entered and the second option is the exact...
  23. Replies
    6
    Views
    1,412

    Thanks for your reply subsonics ive made the...

    Thanks for your reply subsonics ive made the changes you suggested but im getting an error message now ((warning return type of 'main' is not int)) so i thought id post all the code. This was a...
  24. Replies
    6
    Views
    1,412

    Beginners Help

    Hi guys i've just started to learn the c programming language in computing class so im a real noob. This code is writing seven records to a binary file succesfully but the text its outputing is all...
Results 1 to 24 of 24