User Profile
Collapse
-
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. -
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);
}
...Leave a comment:
-
-
-
Ganon11,
I don't know how to use this. How can I use this?...Leave a comment:
-
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
No activity results to display
Show More
Leave a comment: