![]() |
Short Hand Decimal To Binary Vice Versa Good or Bad?
Just wondering if there is an easier way like in C++.
This short bit of code opens a file and checks the binary number saved and closes the file. It then converts that number to decimal. Then it checks it against your current score from the end of the game and if it is higher reopens the file and converts that decimal number into binary and saves it to the file. Is there an easier or even shorter way of doing this. Or is this about it. :
void filewrite() |
With out all the game code this is what it looks like.
:
#include <stdio.h> |
This seems simpler, plus it checks the input for success, which one should always do:
:
#include <iostream> |
| All times are GMT -5. The time now is 3:05 AM. |
Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC