A problem
-
Hello, I create a "MFC application" project in MSVC 2005. But I want to add a class ref from tThread. For example, public ref class tThread { public: XXXXXXXXXXXXX }; I add this code in the Form1.h. But it has a default class From1. I create a new header file to include. #include "mythread.h" But it come some errors. This is mythread.h /////////////////////////// #ifndef MYTHREAD_H #define MYTHREAD_H public ref class tThread { public: static void Threadsend(); } #endif ///////////////////////////// This is mythread.cpp #include "mythread" using namespace System::Threading; static void Threadsend(){ Thread::Sleep( 0 ); } What's wrong with my code or are there better method to do it? Appreciate your reply. Thank you. Jane
-
Hello, I create a "MFC application" project in MSVC 2005. But I want to add a class ref from tThread. For example, public ref class tThread { public: XXXXXXXXXXXXX }; I add this code in the Form1.h. But it has a default class From1. I create a new header file to include. #include "mythread.h" But it come some errors. This is mythread.h /////////////////////////// #ifndef MYTHREAD_H #define MYTHREAD_H public ref class tThread { public: static void Threadsend(); } #endif ///////////////////////////// This is mythread.cpp #include "mythread" using namespace System::Threading; static void Threadsend(){ Thread::Sleep( 0 ); } What's wrong with my code or are there better method to do it? Appreciate your reply. Thank you. Jane
-
Hi, i never heared about a "ref class", but google lists some sites about it. What do you like to do exactly? Greetz
We have ref class and value class (on the CLI/C++) its better I write of MSDN A ref class or ref struct can inherit from zero or more managed interfaces and zero or one ref types. A value class or value struct can only inherit from zero or more managed interfaces.
public ref class Items
{
private : int size;
....
};public value class differ
{
private:
String^ str;
....
}; -
We have ref class and value class (on the CLI/C++) its better I write of MSDN A ref class or ref struct can inherit from zero or more managed interfaces and zero or one ref types. A value class or value struct can only inherit from zero or more managed interfaces.
public ref class Items
{
private : int size;
....
};public value class differ
{
private:
String^ str;
....
};Hamid. wrote:
We have ref class and value class (on the CLI/C++)
Seems as if you are in the wrong Forum... Try your question in theManaged C++-Forum[^]
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words -
Hamid. wrote:
We have ref class and value class (on the CLI/C++)
Seems as if you are in the wrong Forum... Try your question in theManaged C++-Forum[^]
Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening wordsBut I dont have any question.
-
But I dont have any question.