0

I am developing a C++ program using Visual Studio, and the muparser library to evaluate a mathematical expression. However, when I run my code, I get the following error message:

Debug Assection Failed Image

This is the code I'm using:

#include <iostream>
#include "muparser.h"

int main(int argc, char* argv[])
{
    try
    {
        double var_a = 1;
        mu::Parser p;

        p.SetExpr("2*2");

        std::cout << p.Eval() << std::endl;
    }
    catch (mu::Parser::exception_type& e)
    {
        std::cout << e.GetMsg() << std::endl;
    }

    return 0;
}
Remy Lebeau
  • 555,201
  • 31
  • 458
  • 770
  • Something seems fishy here. The crash is in the C runtime library on a call to `fwrite`. Maybe you have built the `muParser` library against a different runtime library than your solution is using. – paddy Apr 12 '23 at 23:42

0 Answers0