Hello! I need to count the number of words in a string read in from an infile, in a function, but I don't know how to do this. This is what I have so far.
//Tiffany Lynn Goodseit
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void diffwords(strin g &line);
int main()
{
string line;
//open input...
User Profile
Collapse
-
Number of words in a string read from a file
-
Tigerlily started a topic My Program is compiling, but it wont stop running. Can you please help me?in CMy Program is compiling, but it wont stop running. Can you please help me?
// Program to create new accounts, perform deposits, withdrawals, and bank
//inquiries
#include<iostre am>
#include<fstrea m>
using namespace std;
void menu();
int read_accts(int [], double [], int);
void withdrawal(int [], double [], int);
void deposit(int [], double [], int);
int new_acct(int [], double [], int);
void balance(int [], double[], int);
int main()...
No activity results to display
Show More