Diablicolic
Well-known member
I have two questions for you people today, the first question has to do with syntax, the other...well, has to do with something kind of annoying hehehe
So lets get started, my problem is this:
At the THIS IS THE PROBLEM comment, is the problem
You see Im not totally sure how to compare the char conversion to the string "blah".
--------------------------------
My other question would have to deal with a window that pops up ALWAYS when I build the C++ Application, this is what pops up and it always pops up:
So lets get started, my problem is this:
Code:
//
// Converts Celsius to Fahrenheit
//
#include <stdio.h>
#include <iostream.h>
int main(int argc, char* argv[])
{
// Ask what the person wants to convert
char conversion;
cout << "What would you like to convert today?" << "\n";
cin >> conversion;
if (conversion == "b") THIS IS THE PROBLEM
cout << "You want to convert " << conversion << "\n";
else
cout << "You suck..." << "\n";
// Enter the temperature in Celsius
int celsius;
cout << "Enter the temperature in Celsius: ";
cin >> celsius;
int factor;
factor = 212 - 32;
int fahrenheit;
fahrenheit = factor * celsius/100 + 32;
cout << "Fahrenheit value is: " << fahrenheit << " degrees" << "\n";
return 0;
}
At the THIS IS THE PROBLEM comment, is the problem
You see Im not totally sure how to compare the char conversion to the string "blah".
--------------------------------
My other question would have to deal with a window that pops up ALWAYS when I build the C++ Application, this is what pops up and it always pops up: