void secimekran() {
string secim;
float f, c;
cout << "c to f or f to c ? " << endl;
cin >> secim;
if (secim == "c to f ") {
cout << "How much celcius" << endl;
cin >> c;
ctofah(c);
} else {
cout << "how much f";
cin >> f;
fahtoc(f);
}
}
It compiles without error but none of the cin work. Both of them get 0 as default input. Why?
Example:
wlcome c to f or f to c ?
c to f
how much f0 F -17.7778 derece