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

C / C++ / MFC

 
GeneralRe: Create Dynamically Generated Arrays Pin
Ryan Binns20-Feb-05 17:10
Ryan Binns20-Feb-05 17:10 
GeneralRe: Create Dynamically Generated Arrays Pin
LighthouseJ20-Feb-05 8:01
LighthouseJ20-Feb-05 8:01 
GeneralCFtpConnection::GetFile Directory Issues Pin
JimmyGoon19-Feb-05 16:11
JimmyGoon19-Feb-05 16:11 
GeneralRe: CFtpConnection::GetFile Directory Issues Pin
JimmyGoon21-Feb-05 10:46
JimmyGoon21-Feb-05 10:46 
QuestionSIMPLE QUESTION!!! WHAT STUPID THING AM I DOING WRONG??? Pin
...---...19-Feb-05 11:46
...---...19-Feb-05 11:46 
AnswerRe: SIMPLE QUESTION!!! WHAT STUPID THING AM I DOING WRONG??? Pin
Michael Dunn19-Feb-05 11:56
sitebuilderMichael Dunn19-Feb-05 11:56 
GeneralRe: SIMPLE QUESTION!!! WHAT STUPID THING AM I DOING WRONG??? Pin
...---...19-Feb-05 12:13
...---...19-Feb-05 12:13 
AnswerRe: SIMPLE QUESTION!!! WHAT STUPID THING AM I DOING WRONG??? Pin
macrophobia19-Feb-05 17:50
macrophobia19-Feb-05 17:50 
Im kinda new at this stuff, (so keep that in mind) but I think I see a couple of problems.

template sould be followed by (class t)

That is where you declare the new identifier type "t". So that the compiler knows that this will be an acceptable data type when it sees it.

Second thing I see, is that you dont have much of a constructor for your class.

You declared a function within the Complex1 class. You named it Complex. But I dont see anywhere that you have defined what the function will do. I beleive the class is also unusable because the variables within it (t re, and t im) are uninitialized. (Again, no constructor.)


Are you trying to do something like this?
<br />
template<class t><br />
Complex1<br />
{<br />
public:<br />
Complex1();<br />
void Complex(t re,t im);<br />
<br />
private:<br />
t<br />
     re,<br />
     im;<br />
};<br />
<br />
////////////////////////////////////////////<br />
<br />
#includes...<br />
<br />
Complex1::Complex1()<br />
{<br />
     re = 0;     //this part may not<br />
     im = 0;     //be necessary<br />
}<br />
<br />
void Complex1::Complex(t r, t i)<br />
{<br />
     t re = t r;<br />
     t im = t i;<br />
}<br />
<br />
void main()<br />
{<br />
.<br />
.stuff<br />
.<br />
}

I hope this helps.

Travis
AnswerYour solution Pin
David Nash22-Feb-05 21:25
David Nash22-Feb-05 21:25 
GeneralMFC + Images + Drawind +Saving Pin
Niewiem19-Feb-05 11:33
Niewiem19-Feb-05 11:33 
GeneralVirtual Keys Pin
CodyDaemon19-Feb-05 11:18
CodyDaemon19-Feb-05 11:18 
GeneralRe: Virtual Keys Pin
Neville Franks19-Feb-05 11:40
Neville Franks19-Feb-05 11:40 
GeneralRe: Virtual Keys Pin
Michael Dunn19-Feb-05 12:03
sitebuilderMichael Dunn19-Feb-05 12:03 
GeneralRe: Virtual Keys Pin
Justin Cobb (Guest Mode)21-Feb-05 7:48
sussJustin Cobb (Guest Mode)21-Feb-05 7:48 
GeneralProcess launching Pin
Masud Alipour19-Feb-05 11:09
Masud Alipour19-Feb-05 11:09 
GeneralRe: Process launching Pin
Michael Dunn19-Feb-05 12:07
sitebuilderMichael Dunn19-Feb-05 12:07 
QuestionRe: Process launching Pin
J.B.22-Sep-08 4:10
J.B.22-Sep-08 4:10 
GeneralExit Error, revisited (updated) Pin
LighthouseJ19-Feb-05 10:18
LighthouseJ19-Feb-05 10:18 
GeneralWhy am i getting this error and how to solve it? Thanks. Pin
shapper19-Feb-05 10:07
shapper19-Feb-05 10:07 
GeneralRe: Why am i getting this error and how to solve it? Thanks. Pin
ThatsAlok19-Feb-05 19:57
ThatsAlok19-Feb-05 19:57 
GeneralWriting File Output Simultaneously Pin
OutlawTornNMT19-Feb-05 9:57
OutlawTornNMT19-Feb-05 9:57 
GeneralRe: Writing File Output Simultaneously Pin
Blake Miller22-Feb-05 6:52
Blake Miller22-Feb-05 6:52 
GeneralAccess Files Pin
Fadhil T Aula19-Feb-05 8:27
Fadhil T Aula19-Feb-05 8:27 
GeneralVisual DSP++ Pin
belame19-Feb-05 6:18
belame19-Feb-05 6:18 
QuestionCOM of shell menu? Pin
includeh1019-Feb-05 6:09
includeh1019-Feb-05 6:09 

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.