|
|
|
| Макрос должен менять местами свои аргументы: #include "stdafx.h"
#include <iostream>
using namespace std;
#define swap(x,y); {int tmp=(x);(x)=(y);(y)=tmp;};
int main(){
int arg;
cout<<"/nVVedine 4islo: "<<"/nVvedennoe 4islo : "<<arg<<endl;
cin>>arg;
int x=(arg/100)*100;
int y=(arg%100);
cout<<"/nNovoe 4islo: "<<swap(x,y)
return 0;
}
|
Ругается на строку -
cout<<"/nNovoe 4islo: "<<swap(x,y) |
: error C2059: syntax error : ';'
спасибо | |
|
|