Trying to convert my following go code question
How to create a 0x appended hex string from a hex string for each byte of hex characters in golang?
to C++ - but completely lost.
#include <iostream>
#include <string>
using namespace std;
// Function to append 0x
void appendX(string str)
{
// Appends 1 occurrences of "X" to str
str.append(1, 'X');
cout << "Modified append() : ";
cout << str;
}
int main()
{
string str("01234567891011121314151617181920");
cout << "String : " << str << endl;
appendX(str);
return 0;
}