I am trying to write a program where it reads two lines from a text file an combines them to make a password key. My issue is that I keep getting errors when compiling the program. All my research online has come up blank. Can someone tell me what I am missing.
The error I am getting is [Error] no matching function for call to 'std::basic_istream<char>::getline(std::istream&, <unresolved overloaded function type>)'
when you use cin.getline() function, then its parameters would be either a constant character pointer or a character array name and the numbers of characters to get.
i.e.
you can also use getline like this std::getline(std::cin, STRINGNAMEHERE);
And why do you have usingnamespace std;
if you are using std on each thing manually honestly I think you should just get rid of the using namespace std.
(btw cout is part of the std namespace also not just cin same with strings and ifstream and ofstream)
btw tneufeld the reason you had that error was because you went from array positions 1 - 7 instead of 0 - 6 arrays and vectors and stuff like that start at 0 and work their way up thats why carm's solutions works his loop starts at 0 and ends at 6 position 7 does not exist that is why you are getting that weird number.