hi all in need your help plz

i need the output and the memory for this code plz

void f1(int a, int &b, char r)
{
int one;
one=a;
a++;
b*=2;
r='B';
cout<<a<<b<<r;
cout<<one<<endL;
}
void f2( int &x, int y , char &w )
{
x++;
y=y*2;
w='G';
cout<<x<<y<<w<<endL;
}
void main ()
{
int n1=1 , n2=3;
ch='A';
cout<<n1<<n2<<ch<<endL;
f1(n1,n2,ch);
cout<<n1<<n2<<ch<<endL;
f2(n2,25,ch);
cout<<n1<<n2<<ch<<endL;
}


thank you
http://ideone.com/EDpjV3

Errors, errors everywhere.
Well it would be more clear if you could tell me exactly what error you are getting.

also i don't understand for what do you need memory?
try this: is it what you are trying to do?

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#include <iostream>
#include <stdlib.h>

using namespace std;


void f1(int a, int &b, char r)
{
	int one;
	one = a;
	a++;
	b *= 2;
	r = 'B';
	cout << a << b << r;
	cout << one << endl;
}
void f2(int &x, int y, char &w)
{
	x++;
	y = y * 2;
	w = 'G';
	cout << x << y << w << endl;
}

int main()
{
	int n1 = 1, n2 = 3;
	char ch = 'A';
	cout << n1 << n2 << ch << endl;
	f1(n1, n2, ch);
	cout << n1 << n2 << ch << endl;
	f2(n2, 25, ch);
	cout << n1 << n2 << ch << endl;

	return 0;
}
Topic archived. No new replies allowed.