I have a couple of questions. If I manually enter a file path, the function fopen\_s always fails, but if I set the same path by code, the file opens without problems. My second issue is "delete[] bytes" and "delete[] locatie" doesn't compile, I get

> 
> error C2065: 'delete' undeclared identifier
> 
> 
> 

and

> 
> C2059: syntax error ']'
> 
> 
> 

and I have no clue why. The ASM part is an optimized loop btw.

```
char* getline()
{
    char line[50];  
    char *eof;
    line[0] = '\0'; 
    line[sizeof(line)-1] = ~'\0';  
    eof = fgets(line, sizeof(line), stdin);
}

int _tmain(int argc, _TCHAR* argv[])
{
    char* locatie, *bytes, c;
    FILE* bestand;
    int i, size;
    struct stat st;

    printf_s("Voer het pad van het bestand in en druk op enter.\n");
    locatie = getline();
    locatie[strlen(locatie)-1] ='\0';
    locatie = "C:\\Users\\xxx\\Documents\\haha.txt"; // <-- this line

    if ((i = fopen_s(&bestand, locatie, "r" )) != 0)
    {
        printf_s("Het bestand bestaat niet, of kon niet worden geopend!");
        getchar();
        return -1;
    }

    stat(locatie, &st);
    size = st.st_size;
    bytes = (char*)malloc(i+1);
    i = 0;

    loop:
    c = fgetc(bestand);
    __asm
    {
        movsx eax, byte ptr [c]
        cmp eax, 0x0FFFFFFFF
        je Break
        mov eax, dword ptr [bytes]
        add eax, dword ptr [i]
        mov cl, byte ptr [c]
        xor cl, 32
        mov byte ptr [eax], cl  
        mov eax, dword ptr [i]  
        add eax, 1
        mov dword ptr [i], eax
        jmp loop
    }

    Break:
    fclose(bestand);
    bytes[i] = '\0';
    printf(bytes);

    locatie = "C:\\Users\\xxx\\Documents\\haha.cpt";
    fopen_s(&bestand, locatie, "w");
    fprintf_s(bestand, "%c", bytes);
    fclose(bestand);
    delete[] bytes;
    delete[] locatie;
    return 0;
}

```