locked
PLEASE HELP! How to fix Error E1696 - File Source Cannot be Opened "iostream"??????? RRS feed

  • Question

  • I HAVE BEEN LOOKING ON THE WHOLE INTERNET, YOUTUBE, GOOGLE AND NOTHING WORKS. PLEASE HELP.

    CODE: 

    #include <iostream>

    using namespace std;

    int main()
    {
    cout << "Hello, World!" << endl;
    }

    Sunday, October 27, 2019 1:47 PM

All replies

  • #include <iostream> - doesn't work :c

    Sunday, October 27, 2019 1:47 PM
  • I'LL STAY ACTIVE UNTIL I GET ANSWERS
    Sunday, October 27, 2019 1:49 PM
  • Hi Lslkaiaoqlaoaoa,

    Welcome to MSDN forum.

    According to your description, I might need to confirm some information from you. Which version of Visual Studio do you use? When did your issue appear, for example, change to use other version of operating system or maybe just create a new project after installing VS? Which version of Windows system do you use?

    I suggest you could refer to below steps to try to troubleshoot this issue.

    #1. Try to reset Visual C++ settings.

    Please open Visual Studio -> Tools -> Import and Export Settings… -> select Reset all settings -> Next -> choose “No, just reset settings, overwriting my current settings” -> select Visual C++ -> Finish

    #2. Try to choose a corresponding Windows SDK version.

    Please open your C++ project -> right-click your project -> Properties -> Configuration Properties -> General -> Windows SDK Version -> choose the corresponding version of your computer’s operating system.(like 10.0 latest installed version)

    #3. Try to refresh VC++ Executable Directories.

    Please open your C++ project -> right-click your project -> Properties -> Configuration Properties -> VC++ Directories -> Executable Directories -> click on the drop down and select “Edit” -> Uncheck “Inherit from parent or project defaults” -> Check “Inherit from parent or project defaults” again -> OK -> Rebuild the project -> close and restart VS to check if this issue could be solved.

    #4. Try to make configuration of platform consistent.

    Please check the configuration and platform of your Visual Studio from standard menu and open Properties Window of your project like #2 or #3, then on the top of the Property Page make the Configuration and Platform corresponding to your standard menu setting.

    #5. Try to unload project and then reload project.

    Please right-click your project and choose Unload Project -> right-click and then choose Reload Project –> Rebuild Project and check if it could work this time.

    #6. Try to repair Visual Studio.

    Not sure which version of VS do you use. If you use VS 2017 or higher version of VS(like 2019), please open Visual Studio Installer -> find Visual Studio that the version you use -> More -> Repair. If you use VS 2015 or lower version of VS, please open Control Panel -> Programs -> Uninstall a program -> find Microsoft Visual Studio 20XX -> right-click it -> Change -> Repair.

    In addition, you could try to create a new C++ project and check if the newly created solution(project) could work well.  

    Hope all above could help you and any feedback would be great expected.

    Best Regards,

    Tianyu


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.


    Monday, October 28, 2019 5:58 AM
  • Hi Lslkaiaoqlaoaoa,

    What is your visual studio version? We recommend you could Visual Studio 2019 community, it is free for individual developer.

    And please open your project in visual studio, then check if iostream file is in "External dependencies" in solution explorer.

    Hope it could help you.

    Best Regards,

    Dylan


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, October 29, 2019 8:37 AM
  • Hi friend,

    In addition,

     1.please check that the address of the VS identification class library is correct.

    2. please delete the .vs folder under the physical path of your solution.

    3. do a repair in VS installer to check if the vs component is damaged.

    Look forward to hearing from you.

    Best Regards,

    Perry


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Thursday, October 31, 2019 11:27 AM
  • Thanks to the MSDN Forum, My error codes (E1696, E0282., etc) are solved based on the 6 steps which is described above.

    I suggest all the users, who install or update the higher end version of Visual studio (2019) that, they have to follow the steps which is mentioned above, for their installed VS to work with its properties and features in error free manner.

    Tuesday, August 18, 2020 9:36 AM