I want format out in cout , similar to the way printf supports the functionality. I read that iomanip can be used for that purpose. But the problem is at college we have to do in the ancient Turbo C++ and I dont think it has iomanip. I'm making an SIC assembler, wants the address to be printed in 4 digits and also , since address is hex, want the digits A,B..F to be printed in higher case rather than lower. int addr 0x is the format I have used to create them. And is it okay of I dont print it in 4 digits? Or should the address be in 4 digits for an assembler? Please help

According to this textbook, there is a version of <iomanip.h> in Turbo C++ 3.0. Whether it has all of the manipulators you need is another question (those pages aren't part of the freely available sample), but it should at least have a version of the hex manipulator.

And if you can't use iomanip.h you can certainly use printf() . It's still part of C++.