I am trying to assign the array of char s the string read from a file, but I get "initializer fails to determine size of s", "invalid initializer" I found an earlier post on the forum where someone suggested a loop to assign the char array the string one character at a time but that did not work for me. If I manually give it a string like "Hello World" however, it works fine. Any suggestions? Thanks.
Code:while(INPUTFILE && INPUTFILE.peek() != EOF)
{
getline(INPUTFILE, theTerms);
for(int i=0; i < theTerms.length(); ++i)
{
char s[] = theTerms ;
}
...