Error code "exited with code -1073741819"

Anonymous
2021-05-01T12:17:22.567+00:00

I copied my C code from one window and paste it to another window of VS2019, then i debugged the program and i got the message "Test.exe exited with code -1073741819". I am unable to run the program so please help me out.

C++
C++
A high-level, general-purpose programming language, created as an extension of the C programming language, that has object-oriented, generic, and functional features in addition to facilities for low-level memory manipulation.
3,754 questions
{count} votes

2 answers

Sort by: Most helpful
  1. RLWA32 45,691 Reputation points
    2021-05-01T12:54:28.013+00:00

    The exit code -1073741819 in hex is 0xC0000005. If you look up this code in Microsoft's documentation (NTSTATUS Values) you will see that it indicates that your program was terminated due to an access violation. This error can occur for a variety of reasons, including de-referencing a NULL pointer or referencing an invalid address.

    You should step through your code in the debugger line by line to determine where the access violation happens. That should enable you to analyze the situation and identify the cause.

    1 person found this answer helpful.

  2. Jabez Law 0 Reputation points
    2023-06-25T13:34:32.5+00:00

    #include <stdio.h>

    int main() {

    int (*myshow) (const char *, ...);

    printf("the printf is %p\n", printf);

    myshow = (int (*) (const char *, ...)) 0x00007ff659d516e0;

    myshow("============\n");

    printf("test\n");

    return 0;

    }

    here is my code, which results in "process finished with exit code -1073741819", can you explain it for me? 
    a tutor online run these code on linux, and it works well. does that indicates the problem is related to the operating system environment?
    

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.