I have written a program that splits a string when the respective delimiter occurs. But a different error is occurring like :
Error 1 error L
CrtDbgReport
is defined in debug version of CRT (C Run-time Library). You are most likely building debug configuration but linking against release version of CRT.
Check Properties -> C/C++ -> Code Generation -> Runtime library.
Other possibility is that you are building release configuration but have some define that is causing string
to be built in debug configuration. The easiest example of this would be:
#define _DEBUG
#include <string>
and building your example in release will cause exactly this problem even if the correct runtime library is chosen.