Pourquoi sa swap pas?
c1117
-
xav3601 Messages postés 3390 Statut Membre -
xav3601 Messages postés 3390 Statut Membre -
Bonjour,
Je comprend pas pourquoi sa swap pas et vous?
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void swap (int * a,int * b ) {
int * temp = a;
a=b;
b=temp;
}
int main () {
int i=10,j=20;
swap(&i,&j);
cout << i << ' ' << j;
}
sa affiche 10 20 :-(
Je comprend pas pourquoi sa swap pas et vous?
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
void swap (int * a,int * b ) {
int * temp = a;
a=b;
b=temp;
}
int main () {
int i=10,j=20;
swap(&i,&j);
cout << i << ' ' << j;
}
sa affiche 10 20 :-(
A voir également:
- Pourquoi sa swap pas?
- Windows swap - Guide
- Face swap forum - Forum Graphisme
- Swap ram - Forum Windows
- Swap magic ✓ - Forum Jeux vidéo
- Hot swap - Forum Matériel & Système