Im new to c++, I just have some experience in coding with java. So my problem: My Programm compiles and works no problem in the IDE(CLion), but when i try to launch the compiled .exe outside of lion I get "missing dll (stdc++-6.dll) error. I tryd to downloade it, but then I get some other error, that gives no hint.
My Code(its only for training):
#include <iostream> // ausgabe
using namespace std;
int main() {
double num1,num2;
char operation,temp;
bool exit= false;
while (!exit) {
cout << "\n\n\nGib die Erste Zahl ein:";
cin >> num1;
cout << "Gib die zweite Zahl ein:";
cin >> num2;
cout << "Gebe eine der Rechenoparationen an (+,-,*,/):";
cin >> operation;
switch (operation) {
case '+':
cout << num1 << " + " << num2 << " = " << num1 + num2 << endl;
break;
case '-':
cout << num1 << " - " << num2 << " = " << num1 - num2 << endl;
break;
case '*':
cout << num1 << " * " << num2 << " = " << num1 * num2 << endl;
break;
case '/':
cout << num1 << " / " << num2 << " = " << num1 / num2 << endl ;
break;
default:
cout << "Ungültiger Operator gewählt" << endl;
break;
}
cout << "Willst du das Programm beenden? (j/n)";
cin>> temp;
if (temp=='j') exit= true;
}
return 0;
}
I´m fighting for the last 3h with this problem. I dont know how to fix it. I try´d to add the include to the CMake.txt, but it diffident worked, it mad nothing.