Click here to Skip to main content
15,887,404 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: TextBox control populates but does not display Pin
BuckBrown23-Aug-07 5:12
BuckBrown23-Aug-07 5:12 
GeneralRe: TextBox control populates but does not display Pin
BuckBrown23-Aug-07 5:27
BuckBrown23-Aug-07 5:27 
GeneralRe: TextBox control populates but does not display Pin
BuckBrown23-Aug-07 5:41
BuckBrown23-Aug-07 5:41 
GeneralRe: TextBox control populates but does not display Pin
Luc Pattyn23-Aug-07 5:48
sitebuilderLuc Pattyn23-Aug-07 5:48 
GeneralRe: TextBox control populates but does not display Pin
BuckBrown23-Aug-07 5:58
BuckBrown23-Aug-07 5:58 
GeneralRe: TextBox control populates but does not display Pin
BuckBrown23-Aug-07 6:05
BuckBrown23-Aug-07 6:05 
GeneralRe: TextBox control populates but does not display Pin
Luc Pattyn23-Aug-07 12:52
sitebuilderLuc Pattyn23-Aug-07 12:52 
QuestionForward Declaration and no appropriate default constructor Pin
BuckBrown20-Aug-07 9:02
BuckBrown20-Aug-07 9:02 
Hi (Luc), I am using Visual Studio 2005 C++/CLI and I am having a problem with a constructor but it looks okay to me. Can anyone tell if this is because I am using a forward declaration?

namespace MySpace {
ref class Class2; // Here is the forward declaration
public ref class Class1 : Form
{
public: Class1(Form form) { Class1 constructor code here }
public: void Print()
{
Class2^ my_class2 = gcnew Class2^(this); // This is causing error
}
}; // end of Class1

public ref class Class2 : PrintDocument
{
public: Class2(Class1^ class_arg){ Class2 constructor code here }
}; // end of Class2
} // end of MySpace namespace

If the single line in the Print() function is remarked out this compiles fine but if it is unremarked out then I get a "no appropriate default constructor" error. I don't see what's wrong with this constructor, does anyone else?

Thanks



Buck
AnswerRe: Forward Declaration and no appropriate default constructor [modified*2] Pin
Mark Salsbery20-Aug-07 9:16
Mark Salsbery20-Aug-07 9:16 
GeneralRe: Forward Declaration and no appropriate default constructor [modified*2] Pin
BuckBrown20-Aug-07 12:16
BuckBrown20-Aug-07 12:16 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
Mark Salsbery20-Aug-07 12:21
Mark Salsbery20-Aug-07 12:21 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
Luc Pattyn20-Aug-07 13:44
sitebuilderLuc Pattyn20-Aug-07 13:44 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
George L. Jackson20-Aug-07 14:40
George L. Jackson20-Aug-07 14:40 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
Luc Pattyn20-Aug-07 14:53
sitebuilderLuc Pattyn20-Aug-07 14:53 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
George L. Jackson21-Aug-07 0:21
George L. Jackson21-Aug-07 0:21 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
iddqd51521-Aug-07 3:46
iddqd51521-Aug-07 3:46 
GeneralRe: Forward Declaration and no appropriate default constructor [modified] Pin
George L. Jackson21-Aug-07 4:52
George L. Jackson21-Aug-07 4:52 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
iddqd51521-Aug-07 5:03
iddqd51521-Aug-07 5:03 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
George L. Jackson21-Aug-07 5:06
George L. Jackson21-Aug-07 5:06 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
iddqd51521-Aug-07 5:45
iddqd51521-Aug-07 5:45 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
George L. Jackson21-Aug-07 5:53
George L. Jackson21-Aug-07 5:53 
GeneralRe: Forward Declaration and no appropriate default constructor Pin
iddqd51521-Aug-07 6:16
iddqd51521-Aug-07 6:16 
Questionis there a way for using a global variable in several Form??? Pin
aefmaaradji20-Aug-07 7:16
aefmaaradji20-Aug-07 7:16 
AnswerRe: is there a way for using a global variable in several Form??? Pin
Mark Salsbery20-Aug-07 9:08
Mark Salsbery20-Aug-07 9:08 
AnswerRe: is there a way for using a global variable in several Form??? Pin
George L. Jackson20-Aug-07 9:50
George L. Jackson20-Aug-07 9:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.