Click here to Skip to main content
15,888,984 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: code doesn't work when compiled in debug mode Pin
Rob Manderson26-Feb-05 13:21
protectorRob Manderson26-Feb-05 13:21 
GeneralRe: code doesn't work when compiled in debug mode Pin
lino_i26-Feb-05 14:18
lino_i26-Feb-05 14:18 
GeneralRe: code doesn't work when compiled in debug mode Pin
Jibesh27-Feb-05 4:51
professionalJibesh27-Feb-05 4:51 
GeneralRe: code doesn't work when compiled in debug mode Pin
lino_i27-Feb-05 5:38
lino_i27-Feb-05 5:38 
Generalvoid* to Address Conversion Pin
Daklan26-Feb-05 12:22
Daklan26-Feb-05 12:22 
GeneralRe: void* to Address Conversion Pin
Michael Dunn26-Feb-05 12:37
sitebuilderMichael Dunn26-Feb-05 12:37 
GeneralRe: void* to Address Conversion Pin
Daklan26-Feb-05 12:48
Daklan26-Feb-05 12:48 
Generalc++ basic class Pin
bigbadnewill26-Feb-05 11:44
bigbadnewill26-Feb-05 11:44 
Ok, i have a problem with classes. I have searched the forums, but all classes on here are so much more complex. (I know i'm a beginner, but we all have to start somewhere Smile | :) ) I have tried, but can't figure it out. I want this program to do two functions, as seen, and then show the sum of these two functions. I have to learn classes for a more difficlut uni assignment, so help would be great!

cheers!!!

#include <iostream.h>

class rectangle

{

public:
rectangle();
double sumA();
double sumB();
private:
double a,b,c,d,e,f,g;

};

int main ()
{
double a=0,b=0,c=0,d=0,e=0,f=0,sumA,sumB;
cout << "enter a\n";
cin >> a;
cout << "enter b\n";
cin >> b;
cout << "enter d\n";
cin >> d;
cout << "enter e\n";
cin >> e;


cout << "the size is: " << sumA()+sumB() << endl;
return 0;
}
rectangle::rectangle()

{

}

double rectangle :: sumA()
{
return c=a+b;
}

double rectangle :: sumB()
{
return f=d+e;
}

GeneralRe: c++ basic class Pin
Daklan26-Feb-05 12:34
Daklan26-Feb-05 12:34 
GeneralRe: c++ basic class Pin
Anonymous27-Feb-05 10:20
Anonymous27-Feb-05 10:20 
GeneralChanging colours of a combo box Pin
Alton Williams26-Feb-05 10:08
Alton Williams26-Feb-05 10:08 
QuestionHow to set up dynamic context menus in MS Word Pin
Sabuncu26-Feb-05 7:12
Sabuncu26-Feb-05 7:12 
GeneralCrashes in international version Pin
JWood26-Feb-05 6:21
JWood26-Feb-05 6:21 
GeneralRe: Crashes in international version Pin
Michael Dunn26-Feb-05 6:51
sitebuilderMichael Dunn26-Feb-05 6:51 
GeneralRe: Crashes in international version Pin
JWood26-Feb-05 8:14
JWood26-Feb-05 8:14 
GeneralRe: Crashes in international version Pin
Michael Dunn26-Feb-05 9:23
sitebuilderMichael Dunn26-Feb-05 9:23 
GeneralRe: Crashes in international version Pin
JWood27-Feb-05 9:34
JWood27-Feb-05 9:34 
GeneralMinidumps! Pin
jhwurmbach27-Feb-05 1:08
jhwurmbach27-Feb-05 1:08 
GeneralRe: Minidumps! Pin
JWood27-Feb-05 9:32
JWood27-Feb-05 9:32 
GeneralRe: Minidumps! Pin
jhwurmbach27-Feb-05 21:04
jhwurmbach27-Feb-05 21:04 
GeneralTab Cntrl String issue Pin
realloc26-Feb-05 4:46
realloc26-Feb-05 4:46 
GeneralRe: Tab Cntrl String issue Pin
Ravi Bhavnani26-Feb-05 5:20
professionalRavi Bhavnani26-Feb-05 5:20 
GeneralRe: Tab Cntrl String issue Pin
Michael Dunn26-Feb-05 6:04
sitebuilderMichael Dunn26-Feb-05 6:04 
GeneralRe: Tab Cntrl String issue Pin
realloc26-Feb-05 6:47
realloc26-Feb-05 6:47 
GeneralRe: Tab Cntrl String issue Pin
Michael Dunn26-Feb-05 12:40
sitebuilderMichael Dunn26-Feb-05 12:40 

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.