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

C / C++ / MFC

 
GeneralRe: _CrtSetBreakAlloc does nothing! Pin
Mark Salsbery20-May-07 9:04
Mark Salsbery20-May-07 9:04 
QuestionRe: _CrtSetBreakAlloc does nothing! Pin
dum20-May-07 9:47
dum20-May-07 9:47 
AnswerRe: _CrtSetBreakAlloc does nothing! Pin
Mark Salsbery20-May-07 11:00
Mark Salsbery20-May-07 11:00 
GeneralRe: _CrtSetBreakAlloc does nothing! Pin
dum20-May-07 14:08
dum20-May-07 14:08 
GeneralRe: _CrtSetBreakAlloc does nothing! Pin
Nibu babu thomas20-May-07 19:19
Nibu babu thomas20-May-07 19:19 
AnswerRe: _CrtSetBreakAlloc does nothing! Pin
Gary R. Wheeler20-May-07 14:04
Gary R. Wheeler20-May-07 14:04 
Questionreturn program Pin
KARFER20-May-07 6:25
KARFER20-May-07 6:25 
AnswerRe: return program Pin
Mark Salsbery20-May-07 6:35
Mark Salsbery20-May-07 6:35 
The value of sum is returned to the caller of add().

Somewhere else in your code you'd call add...

int SumFromAdd = add(2,3);
//SumFromAdd == 5

You can also choose to igore return values...

add(2,3);
// add() has been called but the return value wasn't used

Note that there's no need to initialize sum to 0 in your function since the next line you
initialize it to the sum of the two passed integers. You could shorten your function to:

int add (int a,int b)
{
return a+b;
}

Mark


"Posting a VB.NET question in the C++ forum will end in tears." Chris Maunder

AnswerRe: return program Pin
Hamid_RT20-May-07 7:33
Hamid_RT20-May-07 7:33 
Questionreturn program Pin
KARFER20-May-07 6:21
KARFER20-May-07 6:21 
AnswerRe: return program Pin
Hamid_RT20-May-07 7:35
Hamid_RT20-May-07 7:35 
AnswerRe: return program Pin
Moonis Ahmed20-May-07 20:30
Moonis Ahmed20-May-07 20:30 
QuestionInfo on one process Pin
nofearxd20-May-07 5:47
nofearxd20-May-07 5:47 
AnswerRe: Info on one process Pin
Mark Salsbery20-May-07 6:30
Mark Salsbery20-May-07 6:30 
AnswerRe: Info on one process Pin
Hamid_RT20-May-07 7:53
Hamid_RT20-May-07 7:53 
QuestionMFC resizing OpenGL Pin
zqueezy20-May-07 2:27
zqueezy20-May-07 2:27 
AnswerRe: MFC resizing OpenGL Pin
zqueezy20-May-07 2:37
zqueezy20-May-07 2:37 
GeneralRe: MFC resizing OpenGL Pin
Hans Dietrich20-May-07 5:26
mentorHans Dietrich20-May-07 5:26 
QuestionHow do I create a CBitmap from raw data in memory? Pin
fixitnow20-May-07 2:25
fixitnow20-May-07 2:25 
AnswerRe: How do I create a CBitmap from raw data in memory? Pin
Mark Salsbery20-May-07 6:48
Mark Salsbery20-May-07 6:48 
GeneralRe: How do I create a CBitmap from raw data in memory? Pin
fixitnow20-May-07 18:43
fixitnow20-May-07 18:43 
QuestionRe: How do I create a CBitmap from raw data in memory? Pin
Mark Salsbery21-May-07 4:47
Mark Salsbery21-May-07 4:47 
AnswerRe: How do I create a CBitmap from raw data in memory? Pin
fixitnow22-May-07 23:12
fixitnow22-May-07 23:12 
GeneralRe: How do I create a CBitmap from raw data in memory? Pin
Mark Salsbery23-May-07 5:30
Mark Salsbery23-May-07 5:30 
Questioncode completion feature Pin
SumitMandal20-May-07 0:50
SumitMandal20-May-07 0:50 

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.