Search:

Type: Posts; User: Dangerous Dave

Page 1 of 2 1 2

Search: Search took 0.02 seconds.

  1. Replies
    6
    Views
    1,762

    So have you any ideas on how to solve the problem...

    So have you any ideas on how to solve the problem as defined above?
  2. Replies
    6
    Views
    1,762

    Reading Lines From a File

    Hi all,

    Here is the prob, i have a .txt file containing the following lines there are currently 5 lines but it can keep growing and growing in size.

    I want to be able to read the last 5 lines...
  3. Replies
    2
    Views
    1,362

    The siftUp Function does not work at the moment....

    The siftUp Function does not work at the moment. Its Function is to sift upwards through the heap until it finds a higher value than its current arguement. The insert function calls to the siftUp...
  4. Replies
    2
    Views
    1,362

    Priority Heaps

    You will be writing heap code where the heap priority is no longer decided by a
    simple key value. Instead the key value of a node will be an index into an array of
    pointers to data structures, and...
  5. Replies
    8
    Views
    2,604

    Ok i just got the code working, so i take it what...

    Ok i just got the code working, so i take it what you guys were saying is dont use 3 files use 2. I got rid of the heapTest1.cpp and pastes all that code into the heap.cpp file. I then removed the...
  6. Replies
    8
    Views
    2,604

    Ok, I got the spelling error in the #define...

    Ok,

    I got the spelling error in the #define and changed main() to return a int.

    I dont understand what you maen by include the .h file as i dont have any .h files. i have 2 .cpp and a .hpp. And...
  7. Replies
    8
    Views
    2,604

    Help With Heaps

    hi there,

    I have writeen these three files from notes given in class and by taking bits and peices from books and online. I am compiling these in borland 5.01 and im getting an error saying:
    ...
  8. Replies
    7
    Views
    33,548

    This is what im going to run with now i think....

    This is what im going to run with now i think. Thanks For all the help guys.




    do
    {
    printf("Please Enter Your Choice From The Menu: \t");
    error = scanf("%d%c",&menu_choice, &c);
    ...
  9. Replies
    7
    Views
    33,548

    scanf() error checking

    Currently if this code is run and the user inputs the number 1 or 2 followed by any amount of characters it will take the value 1 or 2 and run. I would like ths case (Number,Char) to be returned as...
  10. Replies
    1
    Views
    1,784

    Currency Convertor

    Hi,

    Thanks for all the help so far. Any more sugestions would be greatly appreciated.

    Thanking you.




    #include <stdio.h>
  11. Replies
    6
    Views
    1,578

    May i point out that your simpson quote is...

    May i point out that your simpson quote is incorrect.

    u have:

    Simpson, Homer Simpson, hes the greatest guy in his-tor-ey! From the, town of brigfield, he's bound ot hit a tree! - as said by...
  12. Replies
    9
    Views
    2,049

    for(i=0; i

    for(i=0; i <= SIZE - 1 ; i++)
    for(j =0; j <= SIZE - 1 ; j++)
    {
    while(strcmp(book_array[i].name, book_array[j].name) < 0)
    {
    strcpy(hold, book_array[j].name);
    ...
  13. Replies
    9
    Views
    2,049

    Why???

    Why???
  14. Replies
    9
    Views
    2,049

    Bubble Sort

    a ^= b ^= a ^= b

    is the same as

    a ^= b
    b ^= a
    a ^= b

    which can be written as
  15. Replies
    5
    Views
    1,537

    JOKE!

    JOKE!
  16. Replies
    0
    Views
    987

    books in or out of datd base

    void add_a_book (BOOK book_array[])
    {



    int i=0;

    while ( book_array[i].number != 0 && i < SIZE )
    {
    i++;
  17. Replies
    5
    Views
    2,735

    while ( i < SIZE && strcmp(book_array[i].name,...

    while ( i < SIZE && strcmp(book_array[i].name, book_name) != 0)
    i++;



    should that do the trick?
  18. Replies
    5
    Views
    2,735

    in the while loop i am comparing a string with...

    in the while loop i am comparing a string with logic opperators, what else can i do?
  19. Replies
    5
    Views
    2,735

    Search By Book Title.

    void search_title (BOOK book_array[])
    {
    int search_database();

    char book_name[SIZE];
    int pos, i ;

    printf("Book Name to Display (max 20 chars) :");
    scanf( "%d",&book_name );
  20. Replies
    5
    Views
    1,537

    did i not say i knew that was the address and i...

    did i not say i knew that was the address and i was just testing everyone. thanx for the help man.

    well done on 1k posts.
  21. Replies
    5
    Views
    1,537

    the last line of the code simpley prints out the...

    the last line of the code simpley prints out the value stored in status.

    but it does not for some reason.
  22. Replies
    5
    Views
    1,537

    Help With Libary Data Base.

    void add_a_book (BOOK book_array[])

    {

    int i=0;

    while ( book_array[i].number != 0 && i < SIZE )
    {
    i++;
    }
  23. Replies
    1
    Views
    1,457

    Flushing Buffer?

    void add_a_book (BOOK book_array[])
    {



    int i=0;

    /* Search the array for an empty position.
    An empty position has a 0 for the book number */
    while ( book_array[i].number != 0 && i <...
  24. Replies
    5
    Views
    1,021

    Try running the program a few times in a row....

    Try running the program a few times in a row. this may cause the program to crash. it should not work but it writes over memory if should not have access to so better to use the right sized arrays.
  25. Replies
    5
    Views
    3,615

    would i be correct in saying that the scanf...

    would i be correct in saying that the scanf function returns a value of 0 if the correct input has been entered and a value of 1 if incorrect input has been entered??

    and if so how would i check...
Results 1 to 25 of 45
Page 1 of 2 1 2