Search:

Type: Posts; User: kevinv2u

Search: Search took 0.01 seconds.

  1. Replies
    15
    Views
    8,914

    I know that both code is the same, and I also...

    I know that both code is the same, and I also know that a string is actually an array of characters.

    What I meant was that I want to assign a pointer char array, so I can have some sort of string...
  2. Replies
    15
    Views
    8,914

    Ok, I've changed my code. Now, when I use: ...

    Ok, I've changed my code.

    Now, when I use:


    char *test;
    test = "hello";

    strcpy(Buff, test);
  3. Replies
    15
    Views
    8,914

    I've got the following code so far for a char...

    I've got the following code so far for a char array:



    static HANDLE hFileMap;
    static char *Buff[2];

    // Create File Mapping (use invalid handle, don't link to real file, +1 for...
  4. Replies
    15
    Views
    8,914

    Ok, that works! Thanks! If anyone can use it,...

    Ok, that works! Thanks!

    If anyone can use it, here is the code:



    static HANDLE hFileMap;
    static char *Buff = NULL;

    // Create File Mapping (use invalid handle, don't link to real...
  5. Replies
    15
    Views
    8,914

    I've got a bit of a mess right now...sorry for...

    I've got a bit of a mess right now...sorry for that!



    static HANDLE hFileMap;
    static unsigned long *Buff = NULL;

    // Create File Mapping (use invalid handle, don't link to real file,...
  6. Replies
    15
    Views
    8,914

    See last message...

    See last message...
  7. Replies
    15
    Views
    8,914

    Memory Mapped File

    Hi,

    I'm working on an assignment in which I have to use a memory mapped file.

    In another assignment I've done this before like this:



    static unsigned long *Buff = NULL;
    static HANDLE...
  8. Replies
    14
    Views
    14,442

    Thanks! I've modified my code...

    Thanks! I've modified my code...
  9. Replies
    14
    Views
    14,442

    You mean that I have to define BUFSIZE in my code...

    You mean that I have to define BUFSIZE in my code as such?:



    #define BUFSIZE 80
  10. Replies
    14
    Views
    14,442

    It's not part of my assignment to allocate a...

    It's not part of my assignment to allocate a dynamic buffer. It's a personal choice of mine.

    I can declare the buffer as such: 'char buffer[80]' and read a text file into this buffer. That would...
  11. Replies
    14
    Views
    14,442

    Yes, I do... I've got experience with various...

    Yes, I do...

    I've got experience with various languages (.NET, Java, VB6, PHP) and operating systems.

    C is quite a bit different though...:D
  12. Replies
    14
    Views
    14,442

    What about using filelength functions, and using...

    What about using filelength functions, and using this to allocate the buffer?
    Is that an option? Or would this be a dirty solution?
  13. Replies
    14
    Views
    14,442

    I need to use read beause of an assignment. We...

    I need to use read beause of an assignment. We need to use direct system calls for handling files.

    The static buffer size is not a problem for my school assignment, but I'm personally not happy...
  14. Replies
    14
    Views
    14,442

    Read Text File with System Call

    Hi All,

    I'm new to C-programming, and I'm trying to read a text file.

    Here's my code so far.



    #include <stdio.h>
    2 #include <stdlib.h>
Results 1 to 14 of 14