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

Managed C++/CLI

 
GeneralRe: BinaryWriter writes empty file Pin
KlaasVersteeg21-Apr-10 2:18
KlaasVersteeg21-Apr-10 2:18 
GeneralRe: BinaryWriter writes empty file Pin
Richard MacCutchan21-Apr-10 4:06
mveRichard MacCutchan21-Apr-10 4:06 
GeneralRe: BinaryWriter writes empty file Pin
KlaasVersteeg21-Apr-10 4:26
KlaasVersteeg21-Apr-10 4:26 
AnswerRe: BinaryWriter writes empty file Pin
Luc Pattyn21-Apr-10 6:04
sitebuilderLuc Pattyn21-Apr-10 6:04 
GeneralRe: BinaryWriter writes empty file Pin
KlaasVersteeg21-Apr-10 20:01
KlaasVersteeg21-Apr-10 20:01 
GeneralRe: BinaryWriter writes empty file Pin
Richard MacCutchan21-Apr-10 21:13
mveRichard MacCutchan21-Apr-10 21:13 
GeneralRe: BinaryWriter writes empty file Pin
KlaasVersteeg21-Apr-10 21:56
KlaasVersteeg21-Apr-10 21:56 
QuestionGenerics problem Pin
roshihans17-Apr-10 17:02
roshihans17-Apr-10 17:02 
I'm still learning about generics so I create a generics function like this :
generic<class T> where T : ValueType
T Process(T val)
{
	val = val * 15;
	return val;
}


and called float a = Process<float>(10.0), but then I got " error C2296: '*' : illegal, left operand has type 'T' " in the line val = val * 15;. Then I try a simpler method like this :

generic<class T> where T : ValueType
T Process()
{
	T val = 15;
	return val;
}


Called float a = Process<float>() and I still got "error C2440: 'initializing' : cannot convert from 'int' to 'T' " in the line T val = 15;
What is the correct way to use generics?

Thanks in advance
QuestionRe: Generics problem Pin
roshihans20-Apr-10 23:44
roshihans20-Apr-10 23:44 
AnswerRe: Generics problem Pin
Ghydo22-Apr-10 23:57
Ghydo22-Apr-10 23:57 
GeneralRe: Generics problem Pin
roshihans24-Apr-10 8:47
roshihans24-Apr-10 8:47 
GeneralRe: Generics problem Pin
Ghydo24-Apr-10 22:23
Ghydo24-Apr-10 22:23 
QuestionPassing structure form VC++ to C# Dll Pin
Anu_Bala14-Apr-10 19:05
Anu_Bala14-Apr-10 19:05 
AnswerRe: Passing structure form VC++ to C# Dll Pin
Andreoli Carlo16-Apr-10 0:27
professionalAndreoli Carlo16-Apr-10 0:27 
QuestionWindows CE 6.0 Pin
jashimu13-Apr-10 5:14
jashimu13-Apr-10 5:14 
Questiontrying to print a rtf file Pin
davesmith2349-Apr-10 20:20
davesmith2349-Apr-10 20:20 
AnswerRe: trying to print a rtf file Pin
Luc Pattyn9-Apr-10 23:38
sitebuilderLuc Pattyn9-Apr-10 23:38 
GeneralRe: trying to print a rtf file Pin
davesmith23410-Apr-10 15:49
davesmith23410-Apr-10 15:49 
QuestionDataGridView in Managed c++ Pin
VCsamir9-Apr-10 2:44
VCsamir9-Apr-10 2:44 
QuestionHow to call a method on another form Pin
KlaasVersteeg8-Apr-10 4:59
KlaasVersteeg8-Apr-10 4:59 
AnswerRe: How to call a method on another form Pin
Andreoli Carlo13-Apr-10 0:41
professionalAndreoli Carlo13-Apr-10 0:41 
GeneralRe: How to call a method on another form Pin
KlaasVersteeg13-Apr-10 1:31
KlaasVersteeg13-Apr-10 1:31 
GeneralRe: How to call a method on another form Pin
Andreoli Carlo13-Apr-10 2:22
professionalAndreoli Carlo13-Apr-10 2:22 
GeneralRe: How to call a method on another form Pin
KlaasVersteeg13-Apr-10 2:25
KlaasVersteeg13-Apr-10 2:25 
Questionobject to string (with 15 digit precision if decimal) [modified] Pin
T21028-Apr-10 4:49
T21028-Apr-10 4:49 

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.