Click here to Skip to main content
15,891,567 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: Printer Spooler Pin
David Crow1-Feb-06 2:19
David Crow1-Feb-06 2:19 
QuestionShow me please.. Pin
KORCARI31-Jan-06 1:12
KORCARI31-Jan-06 1:12 
AnswerRe: Show me please.. Pin
Rage31-Jan-06 1:37
professionalRage31-Jan-06 1:37 
AnswerRe: Show me please.. Pin
Bob Stanneveld31-Jan-06 2:13
Bob Stanneveld31-Jan-06 2:13 
AnswerRe: Show me please.. Pin
Storm-blade31-Jan-06 5:53
professionalStorm-blade31-Jan-06 5:53 
Questionproblem with vob files Pin
sanjukta12331-Jan-06 0:51
sanjukta12331-Jan-06 0:51 
AnswerRe: problem with vob files Pin
Rage31-Jan-06 1:49
professionalRage31-Jan-06 1:49 
QuestionOperator overloading Pin
tbrake31-Jan-06 0:49
tbrake31-Jan-06 0:49 
Hallo

I have written some class
<br />
#if !defined(_COMPLEX_H_)<br />
#define _COMPLEX_H_<br />
<br />
#include <stdio.h><br />
#include <iostream.h><br />
<br />
class Complex  <br />
{<br />
public:<br />
	Complex();<br />
	Complex(const Complex&);<br />
	Complex(double a, double b) : re(a), im(b) {}<br />
<br />
	virtual ~Complex();<br />
<br />
	// Complex += Complex<br />
	const Complex& operator+= (const Complex&);<br />
	// Cpmplex += Zahl<br />
	const Complex& operator+= (const double);<br />
	// Zahl += Complex<br />
	friend Complex operator+= (double&, Complex&);<br />
<br />
	// Comlex + Complex<br />
	Complex operator+ (const Complex&) const;<br />
	// Complex + Zahl<br />
	Complex operator+ (const double) const;<br />
	// Zahl + Complex<br />
	friend Complex operator+ (double, const Complex&);<br />
<br />
	// Complex -= Complex<br />
	const Complex& operator-= (const Complex&);<br />
	// Complex -= Zahl<br />
	const Complex& operator-= (const double);<br />
	// Zahl -= Complex<br />
	friend Complex operator-= (double, Complex&);<br />
<br />
	// Complex - Complex<br />
	Complex operator- (const Complex&) const;<br />
<br />
	// Complex - Zahl<br />
	Complex operator- (const double) const;<br />
<br />
	// Zahl - Complex<br />
	friend Complex operator- (double, const Complex&);<br />
<br />
	// Konjunktion<br />
	Complex operator! (void);<br />
<br />
	// Ausgabe einer Complexenzahl<br />
	friend ostream& operator<< (ostream&,const Complex&);<br />
<br />
private:<br />
	double re;<br />
	double im;<br />
};<br />
<br />
#endif<br />


How to change this operator to global calling and then referencing in the class complex ???

THX T
AnswerRe: Operator overloading Pin
Rage31-Jan-06 1:50
professionalRage31-Jan-06 1:50 
AnswerRe: Operator overloading Pin
Bob Stanneveld31-Jan-06 2:17
Bob Stanneveld31-Jan-06 2:17 
AnswerRe: Operator overloading Pin
tbrake31-Jan-06 2:29
tbrake31-Jan-06 2:29 
QuestionRe: Operator overloading Pin
David Crow31-Jan-06 3:47
David Crow31-Jan-06 3:47 
QuestionRe: Operator overloading Pin
tbrake31-Jan-06 5:53
tbrake31-Jan-06 5:53 
QuestionRe: Operator overloading Pin
David Crow31-Jan-06 6:09
David Crow31-Jan-06 6:09 
QuestionDetect and Fill part of an image Pin
beko31-Jan-06 0:30
beko31-Jan-06 0:30 
AnswerRe: Detect and Fill part of an image Pin
Chris Losinger31-Jan-06 2:05
professionalChris Losinger31-Jan-06 2:05 
GeneralRe: Detect and Fill part of an image Pin
beko31-Jan-06 2:39
beko31-Jan-06 2:39 
AnswerRe: Detect and Fill part of an image Pin
A.A.31-Jan-06 7:47
A.A.31-Jan-06 7:47 
AnswerRe: Detect and Fill part of an image Pin
normanS31-Jan-06 20:16
normanS31-Jan-06 20:16 
GeneralRe: Detect and Fill part of an image Pin
beko1-Feb-06 1:01
beko1-Feb-06 1:01 
GeneralRe: Detect and Fill part of an image Pin
normanS1-Feb-06 19:16
normanS1-Feb-06 19:16 
Questionwant to kill previous instance of the same MFC app Pin
Aryan S31-Jan-06 0:12
Aryan S31-Jan-06 0:12 
AnswerRe: want to kill previous instance of the same MFC app Pin
Owner drawn31-Jan-06 1:05
Owner drawn31-Jan-06 1:05 
AnswerRe: want to kill previous instance of the same MFC app Pin
Rage31-Jan-06 1:52
professionalRage31-Jan-06 1:52 
QuestionSetting wallpaper before SwitchDesktop Pin
Chintoo72331-Jan-06 0:08
Chintoo72331-Jan-06 0:08 

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.