Search:

Type: Posts; User: hinman

Search: Search took 0.03 seconds.

  1. Replies
    6
    Views
    9,010

    Here's my new code # include #...

    Here's my new code



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

    struct elem {
    char word [ 50 ];
  2. Replies
    6
    Views
    9,010

    I understand your logic (somehow), but tell me...

    I understand your logic (somehow), but tell me what these 2 lines of codes are supposed to do ?



    fgets(s,50,stdin);
    delete(&startptr,s);


    Errors:
  3. Replies
    6
    Views
    9,010

    delete an element from a linked list

    Hi,

    I would like to delete an element from a singled linked list, I have the written the function, but I have some troubles calling it.

    The program accepts any words and stores them in the...
  4. Replies
    7
    Views
    1,210

    I am having hard time testing this function, can...

    I am having hard time testing this function, can you please show me how to use the sprintf and make the average ?

    here's my code



    #include <stdio.h>
    #include <stdlib.h>
    #include...
  5. Replies
    7
    Views
    1,210

    any coding example, or tutorial would be welcome....

    any coding example, or tutorial would be welcome. ;)
  6. Replies
    7
    Views
    1,210

    all right thanks for your help :) (the keyword...

    all right thanks for your help :) (the keyword was to uppercase)

    I made a for loop such as follow:


    for (i=1; i < sizeof buffer; i++)
    {
    buffer[i] = toupper(buffer[i]);
    }
  7. Replies
    7
    Views
    1,210

    changing output with fprintf

    I have an input file that contains lines



    word1 word2 word3 45 78 90
    word3 word4 word5 45 80 100


    My program read its lines and displays them in another file using:
  8. Replies
    11
    Views
    1,438

    FILE * fp, * outptr, * outptr2; char buffer [...

    FILE * fp, * outptr, * outptr2;
    char buffer [ 81 ];
    int i;
    outptr = fopen ("file1.dat","w");
    outptr2 = fopen ("file2.dat","w");

    if ( ( fp = fopen ( FILENAME, "r" ) ) == NULL ) {
    ...
  9. Replies
    11
    Views
    1,438

    No it's not what i am trying to do, there are 2...

    No it's not what i am trying to do, there are 2 files, the first one is file.dat the second is file1.dat

    File.dat has a list of 10 lines.

    When I do this:


    while ( fgets( buffer, sizeof...
  10. Replies
    11
    Views
    1,438

    Where did you see any problem with the identation...

    Where did you see any problem with the identation of these 4 lines of code ??


    while ( fgets( buffer, sizeof buffer, fp ) != NULL ) fputs( buffer, stdout ); {
    outptr = fopen...
  11. Replies
    11
    Views
    1,438

    thanks but it's not what I all need. copying a...

    thanks but it's not what I all need.

    copying a file to a terminal, i've already been able to do it.

    but how about writing a new file that writes what the program has read ?



    while (...
  12. Replies
    11
    Views
    1,438

    thanks for your reply well, I changed the code...

    thanks for your reply

    well, I changed the code a bit



    while ( ! feof ( fp ) ) {
    outptr = fopen ("file1.dat","w");
    fputs ( buffer, stdout );
    fgets ( buffer, 81, fp );
  13. Replies
    11
    Views
    1,438

    writing what a program has read

    I have been able to read what are the contents of a file and display them on the screen, it worked well

    Then i tried to write a new file (file1.dat) that contains the odd lines of the first file....
  14. Replies
    13
    Views
    1,993

    tx macgyver for the answer, well 1st, i did not...

    tx macgyver for the answer, well 1st, i did not like quzah's answer because he's talking about failing a homework since the 1st post, what the heck ? it s not a homework, it is something that I want...
  15. Replies
    13
    Views
    1,993

    check the discouraging quzah's answer

    check the discouraging quzah's answer
  16. Replies
    13
    Views
    1,993

    edited

    edited
Results 1 to 16 of 16