char* rez1 = "Rezultat: ";
int rez = 8
#include <limits>
#include <iostream>
#include <cstring>
using namespace std;
#define RESULT_STR "Result : "
int main()
{
char str[sizeof(RESULT_STR)+numeric_limits<int>::digits10+1]=RESULT_STR;
int res=8;
itoa(res,str+sizeof(RESULT_STR)-1,10);
cout<<str<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <string>
#include <sstream>
using namespace std;
int main()
{
string str="Result : ";
int res=8;
ostringstream stream;
stream<<str<<res;
str=stream.str();
cout<<str<<endl;
system("PAUSE");
return 0;
}
#include <iostream>
#include <string>
using namespace std;
int main()
{
string str="Result : ";
string res="8";
cout<<str+res<<endl;
system("PAUSE");
return 0;
}
Result : 8
Если Вы уже зарегистрированы на Портале - войдите в систему, если Вы еще не регистрировались - пройдите простую процедуру регистрации.