Search:

Type: Posts; User: Salem

Search: Search took 0.53 seconds.

  1. Replies
    34
    Views
    8,368

    > Salem, your code does not compile, the...

    > Salem, your code does not compile, the IDE(Code::Blocks) keeps saying that LARGE_INTEGER is an unknown type and so is HANDLE and that #ifdef is unterminated.
    Yeah, that's my fault.
    A severe...
  2. Replies
    34
    Views
    8,368

    This was more or less OK (as a valid C program) ...

    This was more or less OK (as a valid C program)


    FILE *f = fopen("g:\\Mess.m2ts", "rb");
    if (f)
    fseek(f, 0ull, SEEK_END);
    size = ftell(f);
    fclose(f);
    printf ("size is : %ull",...
  3. Replies
    34
    Views
    8,368

    > Your code doesn't compile. I just need a...

    > Your code doesn't compile. I just need a working example so that I can understand what is going on with it
    You'll learn more by making what I've posted work.

    > substitute vars and play around...
  4. Replies
    34
    Views
    8,368

    I suggest you learn as much standard C as...

    I suggest you learn as much standard C as possible on a single platform before worrying about the intricacies of getting portable code to work across a range of platforms.
  5. Replies
    34
    Views
    8,368

    When writing portable code, you should look to...

    When writing portable code, you should look to create your own wrapper functions around the variable functionality.
    Eg.


    #ifdef WIN32
    // Windows
    long long myGetFileSize ( const char *filename...
  6. Replies
    34
    Views
    8,368

    > I am using Code::Blocks GCC under Windows 7...

    > I am using Code::Blocks GCC under Windows 7 64bit
    Code::blocks (via MinGW) uses the Microsoft runtime library, which means you have all the bugs and incompatibilities thereof.

    Size...
  7. Replies
    34
    Views
    8,368

    > long ftell(FILE *stream); Your file is...

    > long ftell(FILE *stream);
    Your file is larger than a long.

    Use fgetpos() instead, as it should be able to deal with any size your file system supports.

    However, I notice the use of...
Results 1 to 7 of 7