I have next to no experience programming in C++ but was recently sent some code which I need to compile on my (Windows XP) machine. I installed the first free IDE I found - Bloodshed's Dev C++ - which I am told uses mingw as its default compiler. The program refuses to compile for two reasons. The first is that it generates the following error message at the first output line (e.g. std::cout << "... ) in the code:
In instantiation of `std::basic_ios<wchar_t, std::char_traits<wchar_t> >': 59 C:\Dev-Cpp\include\c++\3.4.2\ostream instantiated from `std::basic_ostream<wchar_t, std::char_traits<wchar_t> >'
17 C:\Documents and Settings\User\My Documents\C++ code (orignal + newlines)\main.cpp instantiated from here
67 C:\Dev-Cpp\include\c++\3.4.2\bits\basic_ios.h no type named `pos_type' in `struct std::char_traits<wchar_t>'
Commenting out that line just makes the next output line down generate the same error. Code which I write myself and which includes calls to cout seems to work normally though. I realize that there must be a difference between the two somewhere, but I hoped someone could tell me what I was looking for instead of me posting the 1000 or so lines of foreign code in the hopes that someone else can spot the problem.
My second problem is that the code uses arc4random(), a "strong" pseudorandom number generator which is not included in my compiler's library. Substituting C++'s basic "rand()" unfortunately does not suit the purposes of the program.
Does anyone know how I can get the code which runs arc4random() (or any similarly robust pseudorandom number generator) and get my compiler to recognize that code?
I think the code's original writer used g++ as his compiler. I can find "man" pages for arc4random() online which seem to have something to do with FreeBSD and OpenBSD. Can I get g++ for windows, and does anyone know if it will include the code for arc4random() by default?
I really appreciate any help I can get in this matter. I'm sorry if some of my questions are poorly worded or confusing - I'm not trying to be difficult, I'm just thoroughly confused.