Search:

Type: Posts; User: piffo

Search: Search took 0.00 seconds.

  1. Replies
    21
    Views
    3,328

    I reason that, A closed file can be opened...

    I reason that, A closed file can be opened somewere else if needed. Thats why i like lock files.
  2. Replies
    21
    Views
    3,328

    From what i saw, using wb+ would first truncate...

    From what i saw, using wb+ would first truncate the file before writing new data into it.
  3. Replies
    21
    Views
    3,328

    Here is a working version of the script: What...

    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...
  4. Replies
    21
    Views
    3,328

    I am pretty new to C, been programming C# for...

    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...
  5. Replies
    13
    Views
    2,452

    Problem is, it dosent solve what i am trying to...

    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...
  6. Replies
    13
    Views
    2,452

    Ahh i see what you mean. What i tried to...

    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)
    ----
  7. Replies
    13
    Views
    2,452

    But i still cant manage to compare it against the...

    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
  8. Replies
    13
    Views
    2,452

    -Yes -I want to make it into binary or hex,...

    -Yes


    -I want to make it into binary or hex, so the Decimal value would be 4.
  9. Replies
    13
    Views
    2,452

    Help with a small problem (beginner)

    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...
Results 1 to 9 of 10