[Solved] c++ Making a code that displays equations and keep getting the “expression must have integral or unscoped enum type” error

Introduction

Solution

The error you are getting is likely due to the fact that you are trying to assign a value to a variable that is not of an integral or unscoped enum type. To fix this, you will need to make sure that the type of the variable you are assigning a value to is either an integral type (e.g. int, long, etc.) or an unscoped enum type.

For example, if you are trying to assign a value to a variable of type double, you will need to make sure that the value you are assigning is also of type double.

Once you have ensured that the types of the variables match, you should be able to assign values to them without any errors.


c++ Making a code that displays equations and keep getting the “expression must have integral or unscoped enum type” error

solved c++ Making a code that displays equations and keep getting the “expression must have integral or unscoped enum type” error


If you are getting the “expression must have integral or unscoped enum type” error when trying to make a code that displays equations in C++, there are a few things you can try to resolve the issue.

First, make sure that the equation is written correctly. Check for any typos or incorrect syntax. If the equation is written correctly, then the issue may be with the data type of the variables used in the equation. Make sure that all of the variables used in the equation are of the same data type.

If the data types are correct, then the issue may be with the scope of the variables. Make sure that all of the variables used in the equation are in the same scope. If the variables are in different scopes, then the compiler will not be able to recognize them.

Finally, if the equation is written correctly and the data types and scopes are correct, then the issue may be with the compiler. Make sure that the compiler is set up correctly and that it is compatible with the code.

If you are still getting the “expression must have integral or unscoped enum type” error after trying these steps, then it may be best to consult a professional for help.