Thanks for all the help everyone. I'll definitely try out your code, Salem, when I get home today.
I guess I heard a lot of answers that I more or less expected to hear. I realize that allocating...
Type: Posts; User: jtay
Thanks for all the help everyone. I'll definitely try out your code, Salem, when I get home today.
I guess I heard a lot of answers that I more or less expected to hear. I realize that allocating...
Hey everyone. Been a while since I posted last. I decided to brush up on my C programming skills and try to code a little program for me and my friends to use for a role playing game that we play....
This "fake the garbage" line that you made is actually solving the problem, so I've got the code working now. I think my problem had to do with me not initializing the memory after I reallocated it;...
The code is right up there in the first post. I just stuck a bunch of "printf" statements right after it to see what was going on. The columns in that data correspond directly to how I described...
I appreciate your responses and will definitely be implementing some of them after I fix my problem. I had the program print out the array after it was done running, and this is what I got:
1 4...
I'm having problems allocating space for a 2d array. Since I don't know precisely where the problem is, I've posted the exact content of the function I'm working with as well as the file that it...
Thanks for that! It took me a little while to figure out how to put the typedef in my header file, but my code is working now. I still only understand maybe 70% how this works, but I expect I'll...
Okay, I'm starting to understand how this works. So since my_function is a pointer to long, array_var can only be subscripted once. How would I go about making this so I can subscript it twice? ...
I've fiddled with the code a bit more, but I still can't find what I need to change to get this to work. I don't see how my_function is returning a pointer to an array, since it's declared as long...
Hello everyone, I'm an amateur C programmer working on what every amateur programmer wants to do: make a game. In my case a text adventure, though it's not very far along yet. Anyways, I'm having...