My darn code keeps crashing, what am I doing wrong? I have a class with the follwoing method:
void BBSNode::AddToBuffer(char *buffer) {
//strcat((char*)inputBuffer, (char*)buffer);
sprintf("Got Data: %s\n", buffer);
}
I'm calling the method like this:
nodes[nodeID].AddToBuffer(sockBuffer);
sockBuffer was declared like ...
char sockBuffer[IN_BUFFER_SIZE];
Now, when I run the program and it calls AddToBuffer it crashes with a Bus error.
How am I calling this method wrong?
I'm using XCode 2.0
Thanks!