Thread View: gnu.g++.lib.bug
1 messages
1 total messages
Started by atownley
Mon, 20 Jul 1992 22:42
(none)
Author: atownley
Date: Mon, 20 Jul 1992 22:42
Date: Mon, 20 Jul 1992 22:42
37 lines
1499 bytes
1499 bytes
I don't know if this has already come up or not, but I just
installed gcc-2.2.2 and libg++-2.2 today and was trying to
get a project I'm working on to run properly. When I
compiled with the new compiler, I get a bus error with the
following function. It didn't do this before and I was
wondering if there was something that I didn't know about.
My system configuration is a NeXTcube with NeXTSTEP 2.1
Extended and a 68040 processor.
here is the offending code, taken directly from the module:
void Chapter::WriteChapter()
/* This function writes the chapter database out to the disk in a
* binary format so the database maintains its integrity.
*/
{
FILE *fp;
char *fileName;
char *extension = ".tbf";
cout << "\nEnter the name of the file to save the database under: ";
cin >> fileName;
fileName = strcat(fileName, extension);
fp = fopen(fileName, "w+b");
fwrite(&Members, sizeof(Members), 1, fp);
close(fp);
}
All I am trying to do is get a file extension tacked onto
the end of the string. Any ideas?
Thanks,
Andrew S. Townley
atownley@cs.umr.edu
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads