unsigned int::Parse(Console::ReadLine()); RRS feed

  • Question

  •     unsigned int::Parse(Console::ReadLine()); // c++/cli

        Hi guys, please can someone explain why the above code is an error(intellisense on microsoft visual studio 2015 says typename is not allowed)  but int::Parse(Console::ReadLine()); is not an error, double::Parse(Console::ReadLine()); etc is not an error.


    Sunday, March 5, 2017 2:33 PM

All replies

  • UInt32::Parse(Console::ReadLine()); // c++/cli

    Some one-word types will automatically convert to their corresponding class names.  Like int becomes System::Int32 and string becomes System::String.  But unsigned int is two words, and can't be used as its class name.

    Annoying quirk of C++/CLI.

    Sunday, March 5, 2017 2:47 PM
  • Cheers mate.

    Please can I ask you one more thing mate. I finished learning C++, then MFC not long ago. Am almost done learning C++/CLI and C and will be looking at C++/CX. When done, I want to start earning a living from them, as a freelancer. Can you suggest to me any website and/or place, where I might be able to find people that want job done for them. Am located in London UK.

    Kind regards


    Sunday, March 5, 2017 9:55 PM