none
Ref Classes In Console App RRS feed

  • Question

  • Hi, can I use "ref class" in a C++ console App? See below:

    By the way, here is the compiler error: "this declaration has no storage class or type specifier"

    #include <iostream>
    #include <Windows.h>
    using namespace std;
    
    ref class Automobile // "ref" keyword is causing errors.
    {
    public:
    	void _SomeProperty;
    private:
    	property void SomeProperty
    	{
    		void get()
    		{
    			return _SomeProperty;
    		}
    		void set(void SomeValue)
    		{
    			_SomeProperty = SomeValue;
    		}
    	}
    };
    int main()
    {
    	// Here is where I create an instance of Automoblie Ref Class
    	return 0;
    }


    Tuesday, June 24, 2014 7:55 AM

Answers

All replies