Psst! Did you know DevelopmentNow is a mobile web site design agency?

Contact us for help mobilizing your site, or to sign up for our beta Mobile Web SDK!
all groups > visual c > february 2004 >

visual c : compiler error



Reza A
2/19/2004 6:18:52 AM
Hi all,
I'm currently reading Microsoft Visual C++ .Net and I'm trying to
compile a Dialog box form that I've just created however I'm getting the
following errors.

Output Window
Compiling...
MyDialog.cpp
c:\Code\CppForm\MyDialog.h(168) : error C2440: '=' : cannot convert from
'System::String __gc *' to 'System::Windows::Forms::Label __gc *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
Form1.cpp
c:\Code\CppForm\MyDialog.h(168) : error C2440: '=' : cannot convert from
'System::String __gc *' to 'System::Windows::Forms::Label __gc *'
Types pointed to are unrelated; conversion requires
reinterpret_cast, C-style cast or function-style cast
Generating Code...



Line 168 is
this->Name = S"MyDialog";



which is under the function InitializeComponent() in the following class

public __gc class MyDialog : public System::Windows::Forms::Form

Any ideas what's going on here? on another form where I use this->Name =
"Form1"; and this->Text = "form1"; I receive no errors.

any help is greatly appreciated.

Thanks,

Reza A
2/19/2004 8:58:03 AM
nevermind, i found out that there was a confliction between two names of
variables.

[quoted text, click to view]

AddThis Social Bookmark Button