0

Debugging in Visual studio leads to this error: "Expression: file_name != nullptr". It claims the error is in line 30 but there seems to be nothing related.

Here is line 30 referenced by the error:

unsigned int maxCarbon = 0;  // Initialise with minimum value in unsigned type.

Here is the line I suspect there to be an error with:

sscanf(composition.c_str(), "C%dH%d", &cCnt, &hCnt);

I have no variable named file_name.

waap47
  • 9
  • 1
  • Post the relevant code, else there is no way to help you. – iksemyonov Feb 05 '16 at 02:27
  • Add more code, don't be shy, we can't guess. file_name is not your variable name, its the variable name of a function of the library you are using for example if u r calling (or a function u r calling is calling another function that looks like ) void open(char * file_name) { assert(file_name != nullptr); }; – Jts Feb 05 '16 at 02:34
  • Check to see if there are any file names anywhere in the error message, like `arbitrary_file_name.cpp` or `some_header_or_other.h`. If there are, it'll at least give you somewhere to start. – Justin Time - Reinstate Monica Feb 05 '16 at 03:45

0 Answers0