Thread: Using Mersenne Twister in C++ programs

  1. #1
    Registered User
    Join Date
    Feb 2005
    Posts
    18

    Question Using Mersenne Twister in C++ programs/Including a header file

    Hi. I am trying to use Mersenne twister in my program. (Using Microsoft VS 2003.) I transferred the header file into my project, #included it, but it's coming up with this error:
    fatal error C1803: Cannot open include file: 'MersenneTwister.h' : No such file or directory.

    Any help would be nice.
    Last edited by mero24; 05-02-2005 at 09:59 PM.

  2. #2
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    I transferred the header file into my project, #included it, but it's coming up with this error:
    What were your exact steps when you did that? I'm guessing you didn't insert the file in your project. Just because a file is open does not mean it's part of your project.

  3. #3
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    28,413
    Can you use any other non-standard header files?
    Quote Originally Posted by Bjarne Stroustrup (2000-10-14)
    I get maybe two dozen requests for help with some sort of programming or design problem every day. Most have more sense than to send me hundreds of lines of code. If they do, I ask them to find the smallest example that exhibits the problem and send me that. Mostly, they then find the error themselves. "Finding the smallest program that demonstrates the error" is a powerful debugging tool.
    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  4. #4
    Registered User
    Join Date
    Feb 2005
    Posts
    18
    When I opened the header file, I went to File>Move "MersenneTwister.h" to this project, or whatever it said. In solution explorer, under header files, the file is showing up, so it is definately part of my project.

  5. #5
    Registered User
    Join Date
    Apr 2003
    Posts
    2,663
    Cannot open include file: 'MersenneTwister.h' : No such file or directory.
    Your compiler can't find the file. Did you spell the name of the file correctly in the include?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Recommend upgrade path for C programs
    By emanresu in forum C Programming
    Replies: 3
    Last Post: 11-22-2007, 07:32 AM
  2. Doubts on a Mersenne Twister Class
    By laserlight in forum C++ Programming
    Replies: 1
    Last Post: 04-12-2007, 10:46 AM
  3. Random Number: Mersenne Twister Source Needed
    By mercury529 in forum C++ Programming
    Replies: 12
    Last Post: 11-26-2006, 11:40 AM
  4. POSIX/DOS programs?
    By nickname_changed in forum C++ Programming
    Replies: 1
    Last Post: 02-28-2003, 05:42 AM
  5. executing c++ programs on the web
    By gulti01 in forum C++ Programming
    Replies: 4
    Last Post: 08-12-2002, 03:12 AM