Probleem C++ en CL

  • Beste,


    Zijn er hier mensen die me kunnen helpen met volgend probleem. Ik heb onlangs een cursus online gekocht (geen support achteraf jammer genoeg.) nu loop ik tegen een probleem aan... bij het testen van een heel kleine code wilt het niet lukken.


    Volgende reeds zelf geprobeerd:

    - Herinstallatie Visual Studio en community 2022 en 2019

    - Herinstallatie Visual Studio tools


    Code die ik probeer uit te voeren:

    C++
    #include <iostream>
    
    int main()
    {
        std::cout << "test";
        return 0;
    }


    Fout bij developer (CMD)


    Code
    test.cpp
    C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\include\ostream(743): warning C4530: C++ exception handler used, but unwind semantics are not enabled. Specify /EHsc
    test.cpp(5): note: see reference to function template instantiation 'std::basic_ostream<char,std::char_traits<char>> &std::operator <<<std::char_traits<char>>(std::basic_ostream<char,std::char_traits<char>> &,const char *)' being compiled
    Microsoft (R) Incremental Linker Version 14.29.30154.0
    Copyright (C) Microsoft Corporation.  All rights reserved.
    
    /out:test.exe
    test.obj


    De functie /EHsc staat in het json bestand:


    Hopelijk kan hier mij iemand verder mee helpen, reeds al gevraagd aan chatgpt xD maar zonder succes :)

Participate now!

Heb je nog geen account? Registreer je nu en word deel van onze community!