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

Managed C++/CLI

 
GeneralRe: initializer for arrays Pin
Johann Gerell20-Oct-05 1:00
Johann Gerell20-Oct-05 1:00 
GeneralRe: initializer for arrays Pin
Nishad S20-Oct-05 1:08
Nishad S20-Oct-05 1:08 
GeneralRe: initializer for arrays Pin
prasad_som20-Oct-05 1:06
prasad_som20-Oct-05 1:06 
AnswerRe: initializer for arrays Pin
Nemanja Trifunovic20-Oct-05 2:57
Nemanja Trifunovic20-Oct-05 2:57 
Questiondoes anybody know any free tool for format source code ? Pin
CooperWu19-Oct-05 17:15
CooperWu19-Oct-05 17:15 
AnswerRe: does anybody know any free tool for format source code ? Pin
RichardS25-Oct-05 23:22
RichardS25-Oct-05 23:22 
QuestionCompact Direct Acyclic ByteVector Graph Pin
uno freeware19-Oct-05 16:48
uno freeware19-Oct-05 16:48 
QuestionCopy Ctor in inheritance Pin
LiYS19-Oct-05 16:26
LiYS19-Oct-05 16:26 
Why in Child if I don't specifically call base case and member object's copy ctor, their default ctor is called respectively instead?

#include <iostream>
using namespace std;
class Parent 
{
int i;
public:
	Parent(int ii) : i(ii) {
	cout << "Parent(int ii)\n";
	}
	Parent(const Parent& b) : i(b.i) {
	cout << "Parent(const Parent&)\n";
	}
	Parent() : i(0) { cout << "Parent()\n"; }	friend ostream&
	operator<<(ostream& os, const Parent& b) {
	return os << "Parent: " << b.i << endl;
	}
};
class Member 
{
	int i;
public:
	Member(int ii) : i(ii) {
	cout << "Member(int ii)\n";
	}
	Member(){ cout << "Member()\n"; }
	Member(const Member& m) : i(m.i) {
	cout << "Member(const Member&)\n";
	}
	friend ostream&
	operator<<(ostream& os, const Member& m) {return os << "Member: " << m.i << endl;
	}
};

class Child : public Parent 
{
	int i;
	Member m;
public:
	Child(int ii) : Parent(ii), i(ii), m(ii) {
	cout << "Child(int ii)\n";
	}
	Child(const Child& c) : i(c.i) {}
	friend ostream&
	operator<<(ostream& os, const Child& c){
	return os << (Parent&)c << c.m
	<< "Child: " << c.i << endl;
	}
};
int main() {
Child c(2);
cout << "calling copy-constructor: " << endl;
Child c2 = c; // Calls copy-constructor
cout << "values in c2:\n" << c2;
getchar();
}





AnswerRe: Copy Ctor in inheritance Pin
Johann Gerell19-Oct-05 20:26
Johann Gerell19-Oct-05 20:26 
GeneralRe: Copy Ctor in inheritance Pin
LiYS19-Oct-05 21:16
LiYS19-Oct-05 21:16 
QuestionCalling managed code from unmanaged C++ Pin
Ludwig319-Oct-05 12:22
Ludwig319-Oct-05 12:22 
AnswerRe: Calling managed code from unmanaged C++ Pin
ursus zeta22-Oct-05 11:54
ursus zeta22-Oct-05 11:54 
QuestionExpanding DOS Command-line arguments Pin
ben0909018-Oct-05 16:40
ben0909018-Oct-05 16:40 
AnswerRe: Expanding DOS Command-line arguments Pin
Christian Graus18-Oct-05 17:23
protectorChristian Graus18-Oct-05 17:23 
QuestionNetwork Programming Pin
Member 121638118-Oct-05 8:23
Member 121638118-Oct-05 8:23 
Questionvirtual functions Pin
aloktambi18-Oct-05 1:33
aloktambi18-Oct-05 1:33 
AnswerRe: virtual functions Pin
Cedric Moonen18-Oct-05 4:48
Cedric Moonen18-Oct-05 4:48 
QuestionHow make Voice Chat server/Client ? Pin
ferhattt8417-Oct-05 23:46
ferhattt8417-Oct-05 23:46 
AnswerRe: How make Voice Chat server/Client ? Pin
TheGreatAndPowerfulOz19-Oct-05 11:24
TheGreatAndPowerfulOz19-Oct-05 11:24 
Questionlinked list Pin
da_comp_learner17-Oct-05 20:31
da_comp_learner17-Oct-05 20:31 
AnswerRe: linked list Pin
Cedric Moonen18-Oct-05 4:50
Cedric Moonen18-Oct-05 4:50 
AnswerRe: linked list Pin
Christian Graus18-Oct-05 12:04
protectorChristian Graus18-Oct-05 12:04 
QuestionHelp I am new to C++ Pin
nnmc0117-Oct-05 8:00
nnmc0117-Oct-05 8:00 
AnswerRe: Help I am new to C++ Pin
Bob Flynn17-Oct-05 8:18
Bob Flynn17-Oct-05 8:18 
AnswerRe: Help I am new to C++ Pin
Christian Graus17-Oct-05 12:07
protectorChristian Graus17-Oct-05 12:07 

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.