While you're at it, use the proper C++ cast, which would have errored-out on this one and never let you compile it. What you want is to append an ASCII char, not a char* at the corresponding memory address. Due to function overload resolution, std::string will try to read a C string starting at the memory address corresponding to the cast ASCII value of that character. Why are you casting to a pointer? That is extremely wrong. Using Visual Studio 2017 with the default IDE debug tools. } <- Exception thrown, probably when the while loop condition is re-evaluated? If (!type & scroll != sizeof(unsigned int))Ĭase 9: // Switch between scrolling and typing modes ![]() I have no idea what is causing this "access violation" in this relatively mundane piece of code you can see below: #include The exception is thrown immediately after the switch statement. ![]() I've been struggling to find the source of this error for days and I've finally isolated a snippet to illustrate the problem I'm having. Exception thrown at 0x0F4CD6F0 (ucrtbased.dll) in ChatClient.exe: 0xC0000005: Access violation reading location 0x00000068.
0 Comments
Leave a Reply. |