Greetings, everyone! I'm new to the forums (and also to Allegro) and have a few questions regarding problems with header files in C++. But first, some background: I got a "Program games with C++ and Allegro" book and killed all 900 pages of it in about three days, realizing that I really needed a refresher course in C++ (I took two semesters of it, but that was a year ago) so I got out my old textbook, opened up the .doc's from my lectures, and started reading through my old programs to get a feel for it again. I finally decided to compile one of my old programs that wrote to a .txt file, so I could compare what ended up in the file with the code I'd written, and lo and behold I got a compiler error! Now I used to use Borland and I'd opened the .cpp file in Dev-C++ (which was used extensively in the Game Programming book, so I decided to give it a try) so I thought perhaps that was the problem, but the error was listed as being in the header file (<fstream.h>), and looked so: `_RWSTDExport' does not name a type
//This is the code
extern const int _RWSTDExport __rwOpenTable;//this line was flagged.
extern const char _RWSTDExportFunc(*) __rwOpenTable;
Along with that were about 20 other errors, saying things were declared improperly and such. So I decided to ignore it and proceed to try it in Visual C++ 2005 (I have 4 compilers, the 3 mentioned plus Crimson Editor). I got a compiler error there, too, also in the header file. This one said:
warning C4068: unknown pragma
//about this code...
#pragma option push -b -a8 -pc
Vx Ve -w-inl -w-aus -w-sig
And also said it failed to open a header file named: stdcomp.h. I then tried compiling it in Borland and had no problems at all. I have to assume that when two different compilers are failing to use their own header files correctly, that it must be a result of user error on my part, so... any suggestions? Can anyone tell me how to make one or both of these compilers work. Also: can anyone point me to a resource that tells me how to create an Allegro library that's appropriate for Borland (which I'm more used to). And also: does anyone know of a good web resource/forum post pertaining to syntax and such in header files? I understand the basics, but I can't look at a header file and tell what it does to/in my program.
One more, totally unrelated question: I was messing around in a sample program the other night and had problems where by clicking left arrow once (turn left) I would turn more than 90 degrees if I held it longer than an instant. I tried fixing it with: void set_keyboard_rate(int delay, int repeat) but it had no effect at all, even using values as high as 1000. Can anyone tell me how to either A: use that function properly, or B: lower the keyboard rate in another way? Thanks a ton for your replies, everyone, and I apologize for the long post!