I'm reading a file and I'd like to get short,int etc. apart from the usual char because I want to read 16 bit values...is there a way?

yes, very simple. Ifstream makes the appropriate conversions for you.

short sValue;
int iValue;
long lValue;

ifstream in ("somefile");
in >> sValue >> iValue >> lValue;
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.