If a newline character '\n' is written after the constant and quotaation marks in Visual C++, then this error message is generated. Arbitrarily added newline character will also generate this error. Ex:
string a = "abcde"\n; // This line will generate C2017. \n // This line will generate C2017 too.
Put the newline character '\n' in the string or character constant and remove other unnecessary newline characters.
string a = "abcde\n";