locked
TypeName identifier not found

    Question

  • I created a simple metro style app based on this msdn tutorial

    but it doesnt compile because i get this: "error C3861: 'TypeName': identifier not found"

    at this par of code:

    if (this->Frame != nullptr)
    {
    	this->Frame->Navigate(TypeName(NextPage::typeid));
    }

    Why getting this error?


    verify

    Wednesday, August 28, 2013 3:25 PM

Answers

  • You'll need this declared in your code file:

    using namespace Windows::UI::Xaml::Interop;


    Wednesday, August 28, 2013 8:34 PM

All replies

  • Do you have a reference to the NextPage header in this file?

    #include "NextPage.xaml.h"

    Wednesday, August 28, 2013 4:40 PM
  • You'll need this declared in your code file:

    using namespace Windows::UI::Xaml::Interop;


    Wednesday, August 28, 2013 8:34 PM
  • Do you have a reference to the NextPage header in this file?

    #include "NextPage.xaml.h"


    i've already a reference to the NextPage header.

    verify

    Thursday, August 29, 2013 10:12 AM
  • Thank you , I declared that namespace, and its working!

    verify

    Thursday, August 29, 2013 10:13 AM