User Profile

Collapse

Profile Sidebar

Collapse
plc
plc
Last Activity: Oct 28 '07, 01:14 PM
Joined: Oct 11 '07
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • plc
    replied to Number of word in one text
    in C
    Actually I need both, because I need the to print the average of words per line, so I need the numbers of words and the number of lines.
    See more | Go to post

    Leave a comment:


  • plc
    replied to Number of word in one text
    in C
    I did that:

    [CODE=cpp]#include <iostream>
    #include<fstrea m>
    #include <string>
    using namespace std;

    void main (void)
    {
    ifstream fichier;

    char ar[10000];
    int i, word=1;


    fichier.open("F :\\td3_ex3.txt" );

    while (!fichier.eof() )
    {
    fichier.getline (ar,10000);
    }
    ...
    See more | Go to post
    Last edited by Ganon11; Oct 14 '07, 09:11 PM. Reason: Please use the [CODE] tags provided.

    Leave a comment:


  • plc
    replied to Number of word in one text
    in C
    I know how to use the getline, but how can I use find()?...
    See more | Go to post

    Leave a comment:


  • plc
    replied to Number of word in one text
    in C
    I'm talking about C++
    See more | Go to post

    Leave a comment:


  • plc
    replied to Number of word in one text
    in C
    Ganon11,

    I don't know how to use this. How can I use this?...
    See more | Go to post

    Leave a comment:


  • plc
    started a topic Number of word in one text
    in C

    Number of word in one text

    Hi,

    I'm trying to do a program to count the number of words in a text, and show the average of words per line. How can I count the number of spaces and "enters" in a text?

    Thanks
    See more | Go to post
No activity results to display
Show More
Working...