Call by Reference with String
Hello,
how can I transfer a String variable with Call by Reference?
Here my code:
#include <cstdio>
#include <iostream>
#include <sstream>
#include <string>
void int_to_hex(int *dez,string hex_string); // Prototype
int main(){
string hex_string; //then hex_string becomes a value...
int c = 123;
int_to_hex(int_to_hex(c, hex_string);
return 0;
}
void int_to_hex(int *dez,string hex_string){
hex_string.insert(0,"0x");
}