Search:

Type: Posts; User: dan.goodridge

Search: Search took 0.01 seconds.

  1. Replies
    21
    Views
    2,017

    Here we go:: ...

    Here we go::


    #include<stdio.h>#include<string.h>
    #include <stdlib.h>


    void case1();
    void case2();
    void case3();
  2. Replies
    21
    Views
    2,017

    ok ive done a case fuction and i still dont have...

    ok ive done a case fuction and i still dont have the results printed out to screen but the other functions work.
  3. Replies
    21
    Views
    2,017

    it was to print results then end program

    it was to print results then end program
  4. Replies
    21
    Views
    2,017

    o i have the break in the wrong place it just...

    o i have the break in the wrong place it just jumps to case 4 with it being at that point
  5. Replies
    21
    Views
    2,017

    heres the code case 3: printf("Lists...

    heres the code



    case 3: printf("Lists stock\n");
    {

    FILE *fp; //file pointer
    fp=fopen("stock.txt","r");
    stock mylist[50];
  6. Replies
    21
    Views
    2,017

    when i put in curly brackets it jumps the printf...

    when i put in curly brackets it jumps the printf statement and goes straight to break.
  7. Replies
    21
    Views
    2,017

    ok edited it case 3: printf("Lists...

    ok edited it


    case 3:
    printf("Lists stock\n");
    {

    FILE *fp; //file pointer
    fp=fopen("stock.txt","r");
    stock mylist[50];
  8. Replies
    21
    Views
    2,017

    then it just prints out loads of random numbers ...

    then it just prints out loads of random numbers


    case 3:
    printf("Lists stock\n");
    {

    FILE *fp; //file pointer
    fp=fopen("stock.txt","r");
    stock mylist[50];
  9. Replies
    21
    Views
    2,017

    is there an easier way to print out my entire...

    is there an easier way to print out my entire text file?
  10. Replies
    21
    Views
    2,017

    realloc help

    I have this error 'realloc' : cannot convert parameter 1 from 'stock' to 'void *' but i cant seem to find why ive read about realloc() but i know i need to use malloc() first or calloc() i just cant...
  11. Replies
    10
    Views
    1,322

    i nkow i have to malloc first

    i nkow i have to malloc first
  12. Replies
    10
    Views
    1,322

    ok so ive done strcpy(). Its just the other error...

    ok so ive done strcpy(). Its just the other error i cant seem to do with the relloc
  13. Replies
    10
    Views
    1,322

    heres the whole code: ...

    heres the whole code:



    #include<stdio.h>#include<string.h>
    #include <stdlib.h>
  14. Replies
    10
    Views
    1,322

    ok so i have an error now which i dont understand...

    ok so i have an error now which i dont understand could anyone shed any light please
    1>e:\stock control master\stock control master\stock.cpp(109) : error C2664: 'realloc' : cannot convert parameter...
  15. Replies
    10
    Views
    1,322

    Thanks Malcolm. That is very helpful I had...

    Thanks Malcolm. That is very helpful I had aalready attempted what you posted but I had a few errors but I can see where I had gone wrong much appreciated
    Thanks
  16. Replies
    10
    Views
    1,322

    Counting arrays

    ok so heres my snippet of code what i want to know is how i could get the prgram to show the whole array of the text file as data gets added to the file

    printf("Lists stock\n");
    {

    FILE...
  17. Replies
    1
    Views
    960

    case statement

    Hi i have been able to write to a file but when i choose case 3 to read it just goes to write_info instead of read_infor all help would be appreciated thanks



    #include<stdio.h>...
  18. Replies
    7
    Views
    4,077

    Ok I can write to a file and read from it but I...

    Ok I can write to a file and read from it but I don't know how to search for a piece of data write it into a temp file for editing then write it back into a the original file. Thabks
  19. Replies
    7
    Views
    4,077

    ok so ive changed gets to fgets but i dont have...

    ok so ive changed gets to fgets but i dont have any idea how to edit the data in a file ive gone through books after books and websites just dont see to find it anyway .

    #include<stdio.h>...
  20. Replies
    7
    Views
    4,077

    Stock system

    I have designed a stock system i can read and write to it but i dont know how to edit the data and create a stock level. The code i have is:



    #include<stdio.h>#include<stdlib.h>...
Results 1 to 20 of 22