Thread: Missing <mem.h>?

  1. #1
    Registered User thePope's Avatar
    Join Date
    Mar 2003
    Posts
    26

    Question Missing <mem.h>?

    Hello I just got this book about ray tracing in C++ and I'm looking through the examples. Many of the examples include a file called <mem.h>. It seems to be a standard header file but I don't have it. Why don't I have it? More importantly, is there anyplace I can get it? Is it not a standard header file?

  2. #2
    Registered User
    Join Date
    Nov 2002
    Posts
    126
    try <memory> instead of <mem.h> and see if you have any luck, and if not, what compiler are you using?

  3. #3
    Registered User thePope's Avatar
    Join Date
    Mar 2003
    Posts
    26
    I'm using VC++ v.6. I'm not exactly sure where the mem.h is, the book came with a bunch of header files..oh well..i guess i'll get to clickin' and searchin'

  4. #4
    Registered User thePope's Avatar
    Join Date
    Mar 2003
    Posts
    26
    I changed it but now it's complaining about <values.h> ....I've never even heard of that file, any suggestions? It appears to be a non-programmer defined header file...

  5. #5
    Registered User
    Join Date
    Nov 2002
    Posts
    126
    Nope, sry. Are you trying to include <values.h> yourself or is it giving you an error about it when you try to include <memory>?

  6. #6
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    Are they enclosed in <> or ""?

  7. #7
    Registered User
    Join Date
    Nov 2002
    Posts
    126
    well, if the header file is in the working directory of your compiler, then you use quotes. If the header is in your compiler's include directory or any other specially specified path, use the < > brackets.

  8. #8
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    Originally posted by PorkyChop
    well, if the header file is in the working directory of your compiler, then you use quotes. If the header is in your compiler's include directory or any other specially specified path, use the < > brackets.
    If you mean me, I knew that... thats why I mentioned that.
    If you meant him, thanks for explaining what I meant.


  9. #9
    Registered User
    Join Date
    Nov 2002
    Posts
    126
    oh man, sry trauts, i thought you were the pope(lol...)
    forget about that last post

  10. #10
    Registered User
    Join Date
    Sep 2002
    Posts
    417
    I think its good you said that, in case he didn't know that... I wasn't clear.

    If the original file had "s, then you have to make sure its in the same directory... if it was in <s, then I can't help you because I've never heard of that header.

  11. #11
    Registered User thePope's Avatar
    Join Date
    Mar 2003
    Posts
    26
    It's in "<>", that's why I put them in when I mentioned them. It turns out values.h isn't used anymore, it's obsolete. But values.h really only contained constants and stuff that are now in the files <float.h> and <limits.h>. The bad thing now is I don't what names to change things to to get everything to work. Looks like this might take awhile

  12. #12
    Registered User thePope's Avatar
    Join Date
    Mar 2003
    Posts
    26

    Question

    Would anybody happen to have an old <values.h> file lying around? That would be a tremendous help

  13. #13
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    Would anybody happen to have an old <values.h> file lying around?
    In general, you can't use a header file from a different compiler. See the Programming FAQ

    You have a few options:

    1- Get a book that is ISO/ANSI compliant (or that is compatable with your compiler.)
    2- Ignore the examples with non-standard headers.
    3- Search your compiler for similar functions that might be in a different header file.
    4- Write your own functions to replace the ones from the missing header file.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Errors including <windows.h>
    By jw232 in forum Windows Programming
    Replies: 4
    Last Post: 07-29-2008, 01:29 PM
  2. failure to import external C libraries in C++ project
    By nocturna_gr in forum C++ Programming
    Replies: 3
    Last Post: 12-02-2007, 03:49 PM
  3. more then 100errors in header
    By hallo007 in forum Windows Programming
    Replies: 20
    Last Post: 05-13-2007, 08:26 AM
  4. ras.h errors
    By Trent_Easton in forum Windows Programming
    Replies: 8
    Last Post: 07-15-2005, 10:52 PM
  5. pointer to array of objects of struct
    By undisputed007 in forum C++ Programming
    Replies: 12
    Last Post: 03-02-2004, 04:49 AM