0

Hello I don't know why I can't compile this code ?

#include <iostream>
#include <stdio.h>
using namespace std;

int main()
{
   cout << "Hello world!" << endl;
   extern "C"
   {
      __declspec(dllexport) unsigned long NvOptimusEnablement = 0x00000001;
   }
   return 0;
}

I get this error :

C:\Users\Axel\Desktop\TestPerso\main.cpp|9|error: expected unqualified-id >before string constant|

I'm running on a PC with an Intel Hd chipset and Nvidia graphical card 920M with Windows 10 ont it.

Myranova
  • 123
  • 1
  • 10

0 Answers0