CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9
  1. #1
    Join Date
    Jul 2012
    Posts
    5

    wouldn't post this except i'm in incredible trouble. novice, noob etc.

    http://pastebin.com/tV7LrgzE

    i am using straustropps book to teach myself how to code C++ in visual express

    the code above is the exact code i've used, along with saving the header file on his site into the same project i am working on

    http://pastebin.com/CLHwd9gd

    here is the error code i am getting, do not understand what is going on, any help would be much appreciated!!

  2. #2
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    I don't know what the << thing is that you're using for your cout statements, but it needs to be two of the arrows above the comma key.

  3. #3
    Join Date
    Jul 2012
    Posts
    5

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    thanks, corrected that but it's still not working, the error:

    http://pastebin.com/LBLXFCE7

    is displayed

  4. #4
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    Using this as the header file, http://www.stroustrup.com/Programmin...b_facilities.h, it compiled and linked clean for me with the change I mentioned.

  5. #5
    Join Date
    Jul 2012
    Posts
    5

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    i am not quite sure how to put a header into a project in visual express or if i'm doing it right, thanks a lot for all your help, you're an absolute lifesaver mate,

    i know i'm thinking about this in the wrong way, but if anyone reading this could help, i'd appreciate being told how to put the text from the link GCDEF gave into header in a form an idiot could understand haha

  6. #6
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    open the link, select all, copy.

    In Visual Studio, File, new, file, Visual C++, Header File. Paste. Save as std_lib_facilities.h, or you could just paste the code right into your .cpp file too.

  7. #7
    Join Date
    Jul 2012
    Posts
    5

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    thank you very much my friend, will try when i get back from the gym, thanks a lot!

  8. #8
    Join Date
    Jul 2012
    Posts
    5

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    afraid it's still not working

    thanks so much for your help so far, if any other suggestions are becoming from anyone would be much appreciated

  9. #9
    GCDEF is offline Elite Member Power Poster
    Join Date
    Nov 2003
    Location
    Florida
    Posts
    12,635

    Re: wouldn't post this except i'm in incredible trouble. novice, noob etc.

    Post your exact code again then, because there's nothing wrong with the header file I linked to and other than the <<, there's nothing wrong with your code.

    It's probably best just to post it in here with code tags rather than setting up a link to some external site.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured