I reason that, A closed file can be opened somewere else if needed. Thats why i like lock files.
Type: Posts; User: piffo
I reason that, A closed file can be opened somewere else if needed. Thats why i like lock files.
From what i saw, using wb+ would first truncate the file before writing new data into it.
Here is a working version of the script:
What you missed was simply to use ab+ instead of wb+.
FILE *inp, *inp2;
account ptr, ptr2;
account arr[len];
int menu_choice=1, iInfLoop = 0, i...
I am pretty new to C, been programming C# for along time instead.
I would either use a infinitive loop or create a int that keeps track of the records, so the first int in the file contains...
Problem is, it dosent solve what i am trying to accomplish.
It dosent matter to me if the decimal value is 3 or 5, i am only after if the bit in that location is turned on or off.
0101
what i...
Ahh i see what you mean. What i tried to accomplish was, when using your code:
PrintData(RED | BLUE);
This would return "0011"
0011 (flag)
& 0001 (red)
----
But i still cant manage to compare it against the defined variables and use it as flags
#define RED 0x01
#define BLUE 0x02
#define GREEN 0x03
#define BLACK 0x00
#define YELLOW 0x05
-Yes
-I want to make it into binary or hex, so the Decimal value would be 4.
Hello,
I just recently started to learn C and i have a small question.
I wanted to use Flags to send to a function, but so far i havent been able to get them to work.
I have created a small...