Naive question about using the C++ library

The code that I have includes "Random.h"
but the library I have has "random" but
not Random.h.  

What are my options?

Actually, there are a whole
series of header files that the code asks
for but which are not in the library that I have
access to, including:

#include <cstring>
#include <Random.h>
#include <Uniform.h>
#include <MLCG.h>
#include <Poisson.h>
#include <NegExp.h>
#include <DiscUnif.h>
#include <ctime>

I inherited a c++ code and I would like to
turn it into a portable (or even semi-portable) c++ code.

More specifically, it was written under
"gcc version 2.8.1" and I would like to
make it work with at least one other compiler.
The compiler that I have access to is
DEC/Compaq's cxx for the Alpha processor.

The code doesn't do anything particularly fancy.
It uses random numbers, but the random numbers
don't have to be very random.  It does file I/O
but nothing fancy there either.

I look forward to your answer.

Ken
klopterAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

nietodCommented:
random.h is not a standard C++ header file and random() is not a standard C++ function.  So use fo these prevents portability.  

To stay portable, you can use the rand() function in the <stdlib.h> file.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nietodCommented:
Its hard to say what to do about those other files, they are less likely to have cooresponding standard counterparts.  For <cstring> you cna probalby use the STL string class defined in <string>, but it is likely that you will have to make some changes in the code (mostly in syntax, not in design) to accomodate the change.  The other will be myuch harder, it might help if we know what you were using from them.
0
KangaRooCommented:
You could try to compile them on the new target?
0
klopterAuthor Commented:
That gives me enough to start with.

When I figure out what the code is
using the other header files for
I'll post another question or two.

Thanks,
  Ken
P.S.  I figured that Scott Meyer's
book would be known here, though I
didn't know that he has been deified.
The two C++ books I own are Meyer's
and Stroustrup's.  I enjoy reading
Scott's but I haven't been able to
get myself to plow through much of
Bjarne's.
0
nietodCommented:
Meyer has two books, "Effective C++" and "More Effective C++"  (The "more" is not a second edition, it is a seperate book) and I strongly recommend you get both.  I probably consult them close to once a week myself.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.