Click here to Skip to main content
15,918,343 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generalbinary file reading Pin
bwagz14-Jan-05 6:20
bwagz14-Jan-05 6:20 
GeneralRe: binary file reading Pin
Antony M Kancidrowski14-Jan-05 6:57
Antony M Kancidrowski14-Jan-05 6:57 
GeneralRe: binary file reading Pin
bwagz14-Jan-05 7:09
bwagz14-Jan-05 7:09 
GeneralRe: binary file reading Pin
Antony M Kancidrowski14-Jan-05 15:11
Antony M Kancidrowski14-Jan-05 15:11 
GeneralRe: binary file reading Pin
White Owl14-Jan-05 10:00
White Owl14-Jan-05 10:00 
GeneralHelp IM gonna fail me course at college if i get no help Pin
Member 165528414-Jan-05 5:53
Member 165528414-Jan-05 5:53 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
charlieg14-Jan-05 6:03
charlieg14-Jan-05 6:03 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
David Crow14-Jan-05 9:07
David Crow14-Jan-05 9:07 
Bobsyourmother wrote:
1.i need code for a decimal to hexadecimal converter without using things such as printf etc in the function

Even if you were allowed to use printf(), it would not help in the conversion of base-10 to base-16. While it's true that printf("%#x", 45) would display 0x2d, the number was not actually converted, it was just displayed in a different base.

Counting in different bases is really easy once you know what's going on. The reason that we count in base-10 is because of the number of digits we have on our hands. Were we born with eight digits, our numbering system would be in base-8 instead. That said, the number 2468 in base 10 is:

2x103 + 4x102 + 6x101 + 8x100

In base-8, it would be 4644 or:

4x83 + 6x82 + 4x81 + 4x80

People often think that a computer is this mystical device that somehow manages to do something that people cannot. Wishful thinking but it does the same thing that a person can do only faster and more efficient (e.g., a faster computer doesn't fix bugs, it only makes them faster!). If you cannot do it with pencil and paper, the computer can't do it either! That said, you need to figure out how to do the conversion on paper and then converting that to code will be much easier.

Bobsyourmother wrote:
2. i need code for a program to convert strings of text all to uppercase again without using printf etc in the function.

The ASCII value of 'a' is 97. The ASCII value of 'A' is 65. That should say to you that each lowercase character would need 32 subtracted from it for the uppercase equivalent.


"Opinions are neither right nor wrong. I cannot change your opinion. I can, however, change what influences your opinion." - David Crow


GeneralRe: Help IM gonna fail me course at college if i get no help Pin
alex.barylski14-Jan-05 18:26
alex.barylski14-Jan-05 18:26 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
Malcolm Smart15-Jan-05 7:36
Malcolm Smart15-Jan-05 7:36 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
Branislav14-Jan-05 22:16
Branislav14-Jan-05 22:16 
GeneralRe: Help IM gonna fail me course at college if i get no help Pin
Member 165528416-Jan-05 10:43
Member 165528416-Jan-05 10:43 
GeneralLoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj14-Jan-05 5:39
greekgoddj14-Jan-05 5:39 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj14-Jan-05 5:51
greekgoddj14-Jan-05 5:51 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
Chris Losinger14-Jan-05 12:25
professionalChris Losinger14-Jan-05 12:25 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj16-Jan-05 22:12
greekgoddj16-Jan-05 22:12 
GeneralRe: LoadBitmap results in Assertion at AfxMakeResourceHandle Pin
greekgoddj17-Jan-05 0:32
greekgoddj17-Jan-05 0:32 
GeneralCreating XML Schema in VS.NET... Pin
anderslundsgard14-Jan-05 4:39
anderslundsgard14-Jan-05 4:39 
GeneralCString cutting off my string Pin
Wheatbread14-Jan-05 4:21
Wheatbread14-Jan-05 4:21 
GeneralRe: CString cutting off my string Pin
Chris Losinger14-Jan-05 8:04
professionalChris Losinger14-Jan-05 8:04 
GeneralWeird <= operation Pin
alex120514-Jan-05 4:08
alex120514-Jan-05 4:08 
GeneralRe: Weird <= operation Pin
basementman14-Jan-05 4:24
basementman14-Jan-05 4:24 
GeneralRe: Weird <= operation Pin
Malcolm Smart14-Jan-05 4:39
Malcolm Smart14-Jan-05 4:39 
GeneralRe: Weird <= operation Pin
Ravi Bhavnani14-Jan-05 6:11
professionalRavi Bhavnani14-Jan-05 6:11 
GeneralRe: Weird <= operation Pin
Malcolm Smart14-Jan-05 13:00
Malcolm Smart14-Jan-05 13:00 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.