I am having problems creating a managed class with namespace in visual studio 2012 Windows Runtime Component of C++.
Below is the code:-
#pragma once
#include <string>
using namespace std;
namespace WindowsRuntimeComponent1
{
public ref class Class1 sealed
{
public:
Class1();
string getString(string desc);
};
}
i'm getting error at 'public' which it expected a declaration. beside that, exception return by visual studio 2012 is error C2059:syntax error:'public', error C2143:syntax error:missing ';' before '{', error C2447:'{':missing function header (old-style-formal list?)
Can anyone help me solve this problem. Thank you.