I made a function that separates one of my data points to eliminate a character.I want to add R: G: B: into the 3 numbers. So for example if the values are 255,0,0 than it becomes
255 0 0 I want it to be
R:255 G:0 B:0 This is the function I made to separate the commas.
#include string void RGB(string input) { istringstream ssString(input); while (getline(ssString, input, ',')) cout<< input << endl; }
const string& inputin your signature, it helps avoid unnecessary copying.