1

I'm trying to compile this code is Visual Studio 2015:

int main()
{
    double* pvalue  = NULL; 
    pvalue  = new double;   

    *pvalue = 29494.99;     
    cout << "Value of pvalue : " << *pvalue << endl;

    delete pvalue;         

    return 0;
}

And i'm getting this compile error:

1>MSVCRTD.lib(exe_winmain.obj) : error LNK2019: unresolved external symbol _WinMain@16 referenced in function "int __cdecl invoke_main(void)" (?invoke_main@@YAHXZ)

Is this a Visual Studio problem? Should I reinstall it?

drescherjm
  • 10,365
  • 5
  • 44
  • 64

1 Answers1

1

I started a Win application, not a console application. Dumb mistake.