Search:

Type: Posts; User: prepare

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    1,018

    A little help please

    Hello everyone,

    I have some problems with this program that does very basic calculations.




    #include <stdio.h>
    #define true 1
    #define false 0
  2. Replies
    5
    Views
    1,037

    thanks guys.

    thanks guys.
  3. Replies
    5
    Views
    1,037

    anyone use bloodshed Dev-C++?

    Just downloaded this but seem to be having some trouble running my programs.

    They compile and run, but once the dos window has come up it immediatly closes and doesnt seem to wait for me to "press...
  4. Replies
    15
    Views
    3,302

    Thanks for all the help guys. :) Done as much...

    Thanks for all the help guys. :)

    Done as much as I can, have to demo it tomorrow but spent so much time on this im sick of it.

    cheers,
  5. Replies
    15
    Views
    3,302

    ok this is the last hurdle. I need to perform an...

    ok this is the last hurdle. I need to perform an integer validation check. Now before anyone tells me to search, i have but couldnt find anything I understoof 100%, or even 50% and i really dont want...
  6. Replies
    15
    Views
    3,302

    ok im getting somewhere. newParts_struct...

    ok im getting somewhere.



    newParts_struct newParts;
    char id[7];
    char description[26];
    int quantity;
    fscanf(supplyFile, "%6c %25c %d ", id, description, &quantity);
    id[6] = '\0';
  7. Replies
    15
    Views
    3,302

    yeah that was a typo. not sure what you...

    yeah that was a typo.



    not sure what you mean by this.



    you mean when I decale newParts.id in my structure?. make it null instead of a char?
  8. Replies
    15
    Views
    3,302

    Ok im still having problems. :( the code...

    Ok im still having problems. :(

    the code didnt work because my function newParts = readNewSupply(supplyFile) was trying to read a text file like a binary file.

    so Ive changed it to just use...
  9. Replies
    15
    Views
    3,302

    silly mistake :mad: ah..I dont think i...

    silly mistake :mad:


    ah..I dont think i understood exactly how !feof worked. Are you saying that once it has run through once it wont go through the innner loop again because it thinks its...
  10. Replies
    15
    Views
    3,302

    quzah, i have read the FAQ, but this is the way...

    quzah, i have read the FAQ, but this is the way we have been taught to do it in class and ive never had any problems with it displaying the last line twice like the FAQ says. then again maybe the...
  11. Replies
    15
    Views
    3,302

    nested while loops possible?

    sorry for bugging you guys, last question i promise ;)

    Ok this code needs to

    1)read id and quantity records from a newSupply.txt
    2)read id record from inventory.dat
    3)if there is a...
  12. Replies
    7
    Views
    1,863

    Thanks guys.

    Thanks guys.
  13. Replies
    7
    Views
    1,863

    can anyone give me some help? I know its...

    can anyone give me some help?

    I know its something to do with the way im incorrectly passing vairables down through the functions but i cant work it out :confused:
  14. Replies
    7
    Views
    1,863

    Thanks Salem, by passing parameters you mean...

    Thanks Salem,

    by passing parameters you mean passing the variables through the functions rather then declaring them in callfunction? if you understand that...



    #include <stdio.h>
    #include...
  15. Replies
    7
    Views
    1,863

    file handling and function problem.

    this program is meant to read the binary file, display output on the screen then write the binary files contents to a text file.



    #include <stdio.h>
    #include <ctype.h>

    #define inFileName...
  16. Replies
    3
    Views
    1,083

    thanks dave that worked great, I dont really...

    thanks dave that worked great, I dont really understand what you have done however.


    unsigned int lines = 0;

    why an unsigned int? whats the difference between that and a normal int?



    if...
  17. Replies
    3
    Views
    1,083

    Looping problem.

    Hi guys,

    I have a problem. My program is reading a binary file and displaying pages and pages of output and I want to sort this out by displaying 20 or so lines a page



    void dataPrint(void)...
  18. Binary files output diffently on different PCs?

    Would there be any reason why a binary file displays perfectly on my lab computer at school (using textpad) but then doesnt display when I try the exact same code at home (using Pelles C)?
  19. Replies
    2
    Views
    1,090

    ahh thanks didnt think of that. thought there...

    ahh thanks didnt think of that.

    thought there might have been a specifc command to do this.
  20. Replies
    2
    Views
    1,090

    Command to display X lines per page

    Hi,

    Does anyone know what command I would use if I wanted to display the output of a file but only 10 lines at a time? and then have the user hit enter or something to display another 10?
    ...
Results 1 to 20 of 20