#include<iostream>
#include<string.h>
#include<Windows.h>
.
.
.
using namespace Windows::Networking::Connectivity;
.
.
.
ConnectionProfile^ internetConnectionProfile = NetworkInformation::GetInternetConnectionProfile();
.
.
.
The above is the code but it is showing
error C2653: 'Windows' : is not a class or namespace name
What do I do? Common Language Runtime Support(/clr) is set
I think you want to use C++/CX (not C++/CLI). The languages are practically identical (in terms of how their syntax looks). But building them is not the same: you enable C++/CX by using the /ZW compiler option (which is turned on by default when you create a Windows Store App).
In the UI, the /ZW option is listed as "Consume Windows Runtime Extension"
See:
http://msdn.microsoft.com/en-us/magazine/dn166929.aspx
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With