so i'm suppose to create a program that inputs a cross word with its words to find and the program finds the words for you..so far i only the code for reading in the crossword. i got stuck can someone jst point me in a good direction and help me out on reading at least finding the words that are just across.
#include <iostream>
#include <vector>
using namespace std;
int main()
{
vector<vector<char> > puzzle;
vector<char> row;
string line;
do{
getline(cin, line);
if(line.empty())
{
return 0; //break because return alone won't work
}
for(int i = 0; i < line.size(); ++i)
{
if(isalpha(line.at(i)))
{
row.push_back(line.at(i));
}
}
puzzle.push_back(row);
row.clear();
}while(true);
//<< puzzle.at(0).at(puzzle.at(0).size-1);
string word;
cin >> word;
char broke;
//char one;
for(int i = 0; i < word.size(); ++i)
{
broke = word.at(i);
cout << broke << " " << endl;
for (int x = 0; i < broke.size(); ++x)
{
if(broke == puzzle.at(i))
{
}
}