problem with converting data types


I just started, so I am having a hard time learning C++. I have no experience in any other language. I have been reading some textbooks and I tried to put this program down. It is suppose to convert one data type to another data type, but it isn't running.

#include <iostream>
#include <string>
using namespace std;


int main()


{
char c = 10;
short s = c;

cout << “char to short:" << s << endl;


unsigned char uc = 256; cout << “int to uchar : “ << (int)uc << endl;



int i = 496512.546f; cout << “float to int: “ << i << endl;


s = 496512.987123f; cout << “float to short: “ << s << endl;
}
[/code]

Does anyone have any ideas? Thanks.
You should use " instead of around strings.
Topic archived. No new replies allowed.