I have an assignment that I don't quite understand how to code because my teacher is a crackhead and tells us to learn from coding he's done 20 years ago.
I need to, given a hex string, write a function that returns its binary equivalent. We've only been through the basics of programming ie. apstrings, int stuff etc., so please keep it simple guys. I can't use the getline and .length commands.
He gave us these clues, which don't help me at all.
Please keep it REALLY simple because I've only programmed in C for about a month. I can only use apstrings and int stuff. I searched the boards, but everything was so complicated.Code:header: apstring hex_binary { } use concatenating binary characters hex_binary This is what I have so far void numbers() { ofstream file1; file1.open("a:numbers.dat"); if (!file1) {cerr <<"\n file not open"; exit(1); } { long first, second, third, largest, smallest; cout<<"Key in first character.\n"; cin >>first; cout<<"Key in second character.\n"; cin >>second; cout<<"Key in third character.\n"; cin >>third;
Thnx in advance.



LinkBack URL
About LinkBacks


