473,545 Members | 289 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help on compiling K.Wilder's random number generator with Visio C++ .Net

Hi all,

I got tortured by a very weird problem when I was using k. wilder's
random generator class in my program. PS: wilder's generator class can
be found at http://oldmill.uchicago.edu/~wilder/Code/random/.

Firstly, I got the notorious "fatal error C1010: unexpected end of file
while looking for precompiled header directive" error when I tried to
compile 'randtest.c' provided by wilder.

Then I use the solution of "creat new header file" in the project
properties to fix the problem. However, I got another series errors as
follows:
--------------------------------------------------------------------------------------------------------------------------------------------
randtest.cpp
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cerrno(18) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cerrno(18) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(17) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(17) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(17) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(17) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(17) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(17) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(18) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(18) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(18) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(18) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(18) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(18) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(19) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(19) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(19) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(19) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(19) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(19) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(20) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(20) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(20) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(20) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(20) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(20) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(21) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(21) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(21) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(21) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(21) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(21) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(22) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(22) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(22) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(22) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(22) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(22) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(23) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(23) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(23) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(23) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(23) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(23) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(24) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(24) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(24) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(24) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(24) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(24) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(25) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(25) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(25) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(25) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(26) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(26) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(26) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(26) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(27) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(27) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(27) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(27) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(27) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(27) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(28) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(28) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(28) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(28) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(28) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(28) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(29) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(29) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(29) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(29) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(29) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(29) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(30) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(30) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(30) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(30) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(30) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(30) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(31) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(31) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(31) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(31) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(31) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(31) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(32) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdio(32) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(18) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(18) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(18) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(18) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(18) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(18) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(19) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(19) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(19) : error C2143: syntax error : missing '{'
before ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(19) : error C2059: syntax error : ':'
d:\Program Files\Microsoft Visual Studio .NET
2003\Vc7\includ e\cstdlib(19) : error C2143: syntax error : missing '{'
before ':'
---------------------------------------------------------------------------------------------------------------------------------------------

It looks like I got something wrong in the standard lib-I dont know
what to do with this. Could anyone please help me out?

Cheers,

G

Dec 28 '06 #1
1 1906
On 28 Dec 2006 10:52:35 -0800 in comp.lang.c++, li*********@gma il.com
wrote,
>Then I use the solution of "creat new header file" in the project
properties to fix the problem. However, I got another series errors as
follows:
Please refer to the answer I gave you the previous time you posted
EXACTLY THE SAME question.

Dec 28 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
7360
by: Joe | last post by:
Hi, I have been working on some code that requires a high use of random numbers within. Mostly I either have to either: 1) flip a coin i.e. 0 or 1, or 2) generate a double between 0 and 1. I have utilised the following random number source code http://www.agner.org/random/ What I have found is that there is a problem with seeding. The...
70
6182
by: Ben Pfaff | last post by:
One issue that comes up fairly often around here is the poor quality of the pseudo-random number generators supplied with many C implementations. As a result, we have to recommend things like using the high-order bits returned by rand() instead of the low-order bits, avoiding using rand() for anything that wants decently random numbers, not...
5
3332
by: Peteroid | last post by:
I know how to use rand() to generate random POSITIVE-INTEGER numbers. But, I'd like to generate a random DOUBLE number in the range of 0.0 to 1.0 with resolution of a double (i.e., every possible double value in the range could come up with equal probability). I'd also like to be able to seed this generator (e.g., via the clock) so that the...
2
3287
by: Martin Ho | last post by:
Hi Everyone, I have this code of Mersenne twister, which produces the random numbers, one of the fastest codes as far as I know to produce random numbers. Anyways, it's writen in c# and I need to translate it to vb.net. I tried some translators and I can't get it to work. Could someone help me? This is the code:
104
5058
by: fieldfallow | last post by:
Hello all, Is there a function in the standard C library which returns a prime number which is also pseudo-random? Assuming there isn't, as it appears from the docs that I have, is there a better way than to fill an array of range 0... RAND_MAX with pre-computed primes and using the output of rand() to index into it to extract a random...
0
2999
by: Limpor | last post by:
Hello, I am new to learning java, and i am trying to build the class for a calculation card game, unfortunately i can't get the public Card top() and Card takeTop() method in the Stock class. Can someone helps me. Thanks!! ----------------------------------------------------------------------- The code for the Stock class:...
0
2821
by: Limpor | last post by:
Hi, I’m working on a solitaire game as my course assignment, and I am having trouble to dealing with Stock class, which consists of an upturned top card plus deck. The code for Stock class: import java.util.*; import java.awt.*; /** * The Stock is the deck of unused cards. It is subtly different from the deck * itself in several ways....
1
1911
by: ligong.yang | last post by:
Hi all, I got tortured by a very weird problem when I was using k. wilder's random generator class in my program. PS: wilder's generator class can be found at http://oldmill.uchicago.edu/~wilder/Code/random/. Firstly, I got the notorious "fatal error C1010: unexpected end of file while looking for precompiled header directive" error when...
4
1631
by: UMstudent | last post by:
I'm working on this program for class where I have to an amount of numbers that are randomly picked from 0 - 50. So what I have done is say there are 20 slots in my array so I'm trying to generator 20 random numbers for the array between 0-50 however I've ran into a few problems. Mainly figuring out how to make it print 20 seperate completely...
0
7398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7805
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7416
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7752
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
1
5325
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
3449
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
1
1878
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
1
1013
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
701
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.