doSomething???

what is/what does it do
i've seen people put it in suggested code for other questions of mine but is there an actual command for this?


example
1
2
3
}
void doSomething(int& thisp, int that)
{
I am guessing people are just using that as an example name for a function, you will need to replace it with whatever you actually want done there.

(If I am understanding your question).

thats how I "was"/still am taking it, I'm just taking a quiz online and one of the questions asks to find the out put of the program, and her putting "doSomething" in there kinda threw me off. I'm thinking the part returns 1 and the second part returns 35, as it seems to be my best met out of the other multiple choice options

A. 35 2
B. 1 35
C. 35 7
D. 1 2
E. 1 0

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <iostream>
using namespace std;

void doSomething(int&, int);

int main ()
{
     int first, second;

     first = 1;
     second = 2;
     doSomething (second, first);
     cout << first << second;
     return 0;
}
void doSomething(int& thisp, int that)
{
     int theOther;
     theOther = 5;
     that = theOther + 2;
     thisp = theOther * that;
     return;
} // end doSomething 
Topic archived. No new replies allowed.