Thread: Microsoft Visual C++ 8 Beta Express?

  1. #1
    Registered User
    Join Date
    Nov 2004
    Posts
    2

    Microsoft Visual C++ 8 Beta Express?

    Hello im fairly new to Visual c++/c++ etc... & i really like the IDE
    in the express beta. but i cant compile anything. for instance

    i'll create a new project->win32 console application
    Whenever i try to include header files such as "iostream.h"
    it will give me an error reading that it does not exist?
    why can i not include these files like in the regular MSVC++ 6 IDE?

    Thx for your time

  2. #2
    Hello,

    C++ and C headers differ. Keep in mind iostream is part of the C++ standard, iostream.h isn't. iostream is somewhat more restrictive than the older iostream.h. One would possibly avoid problems by careful use of namespaces, but it would be a lot smarter to stick with one or the other.

    You should avoid using the *.h version as much as possible, because some implementations have bugs in their *.h version. Moreover, some of them support non-standard code that is not portable, and fail to support some of the standard code of the STL.

    Furthermore, the *.h version puts everything in the global namespace. The extension-less version is more stable and it's more portable. It also places everything in the std namespace.

    In conclusion, iostream.h is an old style method of including std C++ headers, and in opposite to iostream you don't have to declare that you're using the std namespace.

    It is sometimes recommended to use:
    Code:
    #include <iostream>
    using namespace std;
    - Stack Overflow
    Segmentation Fault: I am an error in which a running program attempts to access memory not allocated to it and core dumps with a segmentation violation error. This is often caused by improper usage of pointers, attempts to access a non-existent or read-only physical memory address, re-use of memory if freed within the same scope, de-referencing a null pointer, or (in C) inadvertently using a non-pointer variable as a pointer.

  3. #3
    Registered User
    Join Date
    Nov 2004
    Posts
    2
    Hello thx very much for that usefull information. it now works like a
    charm. also i have another question was the run application from the ide removed? cause i always have to locate the directory of my built exe file manually. thx again
    Last edited by goateh; 11-29-2004 at 08:48 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. We Got _DEBUG Errors
    By Tonto in forum Windows Programming
    Replies: 5
    Last Post: 12-22-2006, 05:45 PM
  2. C++ std routines
    By siavoshkc in forum C++ Programming
    Replies: 33
    Last Post: 07-28-2006, 12:13 AM
  3. load gif into program
    By willc0de4food in forum Windows Programming
    Replies: 14
    Last Post: 01-11-2006, 10:43 AM
  4. Errors with including winsock 2 lib
    By gamingdl'er in forum C++ Programming
    Replies: 3
    Last Post: 12-05-2005, 08:13 PM
  5. Learning OpenGL
    By HQSneaker in forum C++ Programming
    Replies: 7
    Last Post: 08-06-2004, 08:57 AM