I'm working on a program that reads a line of code and stores each word into an index or a array of string and I'm stuck. Its a small part of a larger project I must used cin.getline:
#include <iostream>
#include <string>
#include <cstring>
#include <cctype>
#include <iomanip>
using namespace std;
int main ()
{
char anything;
sting word[3000];
while (!cin.eof())
{
cin.getline(anything);
line++;
(somehow I have to put each word from the line into its own index of the string array and I am so lost on how to do that)
}
}