Dynamic Memory allocation example
Posted: Fri Mar 08, 2013 9:50 pm
So I was bored one day, and I was like "hey why don't I mess around with game editor a bit?" So I decided to make a String object, (which was one of my major beefs with game editor is the fact you cant make classes) and so I created a struct called string
I made it so that it dynamically allocates memory for the string. only problem is, I think I found a weird bug in game-editor with the strlen(char*) function
I made two examples of strings. one using linked memory addresses, and the other using a dynamically resizing array.
Please tell me what you think and what is the problem with strlen (if you know)
Edit: to clarify, I am not "back". I just thought I would make a little utility in c, and see if it worked in game-editor
I made it so that it dynamically allocates memory for the string. only problem is, I think I found a weird bug in game-editor with the strlen(char*) function
I made two examples of strings. one using linked memory addresses, and the other using a dynamically resizing array.
Please tell me what you think and what is the problem with strlen (if you know)
Edit: to clarify, I am not "back". I just thought I would make a little utility in c, and see if it worked in game-editor