Category : access-violation

I have following code defined on the C# side that gets data from C++ library. [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] internal struct Address { public string StreetName; public int StreetNumber; } [StructLayout(LayoutKind.Sequential, CharSet = CharSet.Unicode)] internal struct Person { public Address address; } [DllImport("MyLib", CharSet = CharSet.Unicode)] internal static extern int GetPersonInfo(ref Person p); In the ..

Read more

I’m writing a simple program which is expected to create a linked list, then take inputs as names and GPAs for each student. #pragma warning(disable:4996) #include<stdio.h> #include<stdlib.h> #include<iostream> #include<string> using namespace std; struct studentList { struct student* student; struct studentList* next; }*list = NULL; struct student { char* name; double gpa; }; int main() { ..

Read more

So, i’m currently trying to make some OpenGL tests using ImGui on VS2019. My ideia it’s to make a class TestTexture that has a OnRender() function, this class inherit from a Test class and than overrides it’s OnRender function. TestTexture’s OnRender() implementation: void test::TestTexture::OnRender() VertexArray va; VertexBuffer vb(/*args*/); VertexBufferLayout layout; layout.Push<float>(2); layout.Push<float>(2); va.AddBuffer(vb, layout); IndexBuffer ..

Read more