Click here to Skip to main content
15,902,492 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: \\systemname\\C$ Pin
p_12-Nov-07 0:18
p_12-Nov-07 0:18 
GeneralRe: \\systemname\\C$ Pin
Matthew Faithfull12-Nov-07 0:32
Matthew Faithfull12-Nov-07 0:32 
GeneralRe: \\systemname\\C$ Pin
p_12-Nov-07 0:41
p_12-Nov-07 0:41 
GeneralRe: \\systemname\\C$ Pin
toxcct12-Nov-07 2:12
toxcct12-Nov-07 2:12 
QuestionCalculated values from different functions to a single function. Pin
CodingLover11-Nov-07 21:53
CodingLover11-Nov-07 21:53 
AnswerRe: Arguments from different functions to a single function. Pin
baerten11-Nov-07 22:09
baerten11-Nov-07 22:09 
GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 22:16
CodingLover11-Nov-07 22:16 
GeneralRe: Arguments from different functions to a single function. [modified] Pin
Rajasekharan Vengalil11-Nov-07 22:22
Rajasekharan Vengalil11-Nov-07 22:22 
Hmm. Since this is a C++ forum I am going to assume you are using C++. Here's one way of doing it:

void functionOne( int x, int y, int& a, int& b )
{
  // do some work and initialize "a" and "b"
}

void functionTwo( double& dd )
{
  // do some work and initialize "dd"
}

void mainCal( int i, int j, double k )
{
  functionOne( 1, 2, i, j );
  functionTwo( k );
}
The key thing to note here is that a, b and dd are passed by reference to functionOne and functionTwo.


-- modified at 4:34 Monday 12th November, 2007
Fixed typo where only 2 params where supplied to functionOne when it expects 4.


GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 22:27
CodingLover11-Nov-07 22:27 
GeneralRe: Arguments from different functions to a single function. Pin
Rajasekharan Vengalil11-Nov-07 22:33
Rajasekharan Vengalil11-Nov-07 22:33 
GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 22:45
CodingLover11-Nov-07 22:45 
GeneralRe: Arguments from different functions to a single function. Pin
Rajasekharan Vengalil11-Nov-07 22:52
Rajasekharan Vengalil11-Nov-07 22:52 
GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 23:09
CodingLover11-Nov-07 23:09 
GeneralRe: Arguments from different functions to a single function. Pin
Rajesh R Subramanian11-Nov-07 22:23
professionalRajesh R Subramanian11-Nov-07 22:23 
GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 22:31
CodingLover11-Nov-07 22:31 
GeneralRe: Arguments from different functions to a single function. Pin
Nelek11-Nov-07 22:42
protectorNelek11-Nov-07 22:42 
GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 22:54
CodingLover11-Nov-07 22:54 
GeneralRe: Arguments from different functions to a single function. Pin
Rajesh R Subramanian11-Nov-07 22:58
professionalRajesh R Subramanian11-Nov-07 22:58 
GeneralRe: Arguments from different functions to a single function. Pin
Nelek11-Nov-07 23:10
protectorNelek11-Nov-07 23:10 
GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 23:20
CodingLover11-Nov-07 23:20 
GeneralRe: Arguments from different functions to a single function. Pin
Rajesh R Subramanian11-Nov-07 22:49
professionalRajesh R Subramanian11-Nov-07 22:49 
NewsRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 22:58
CodingLover11-Nov-07 22:58 
AnswerRe: Arguments from different functions to a single function. Pin
Rajasekharan Vengalil11-Nov-07 22:16
Rajasekharan Vengalil11-Nov-07 22:16 
GeneralRe: Arguments from different functions to a single function. Pin
CodingLover11-Nov-07 22:19
CodingLover11-Nov-07 22:19 
AnswerRe: Calculated values from different functions to a single function. Pin
only coder11-Nov-07 22:29
only coder11-Nov-07 22:29 

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.