-
I have done all those tutorials, but that one isnt a binary file. Thank you but I dont think that is what I am looking for... and wraithan thanks for your help, but finding anything on binary is like finding a needle in a haystack. I am going to keep looking for stuff on it, but so far has lead me nowhere.
-
Alright I know you guys get tired of so many questions, and I am sorry, but this is more of a yes/no question I think.
Are these mathematics sufficient for statistics relationships?
Code:
//for Hit Points to even at 9999 at 99 constitution uses the following formula
HitPoints = { ( constitution * ( constitution + 2 )) }
//same goes for mana as hit points
ManaPoints = { ( magic * ( magic / 2 )) }
//Damage is a little more complicated using this formula
defense = ( defense * defense + armorbonus );
damage =( ( strength * ( strength )) - defense + weaponbonus);
// this if function checks for below 0 dmg to prevent atacker from healing the defender
if ( damage < 1 ) { damage = 0; };
These are just a couple of my stat systems. but I am wondering if doing something that simple will really work well? I did create a program allowing you to modify each variable to see the outcome, which worked just really wondering if there is a better, more fool proof way of doing this. Yet again thank you very much
-
If you look at all of the available I/O functionality in C/C++ you will find some commonalities.
Both streams, array-based and character based I/O (used to be called byte based) support reading one character, one item, and also support block reads and writes.
You can do binary files with streams or standard good old C I/O. For me it doesn't matter how you do it and one way doesn't make you more elite than another. Just choose a method that gets the job done.
It amazes me that people have problems with I/O in C/C++ when so much support is given for this exact thing. There are about 10 ways I can think of right now to save and load data and that's probably just the tip of the iceberg.
Read the help file and go through some of the examples and you will see the plethora of I/O available to you.
No other language comes close to the C/C++ level of I/O functionality.