Får endast:
error C2061: syntax error : identifier 'val1'
error C2181: illegal else without matching if
#include "stdafx.h"
#include <iostream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
int val;
bool val1;
cout << "What is 10 plus 10?: " ;
cin >> val;
if (val == 20)
val1 = true;
if val1 = true
cout << endl << "good" << endl;
else
cout << endl << "bad.." << endl;
system("pause >nul");
return 0;
}
ät inte katt