Hi guys,
I am new to C++ and am trying to display the contents of an array in the form of {1,2,3,4} but am having some difficulties, they get printed but there is a trailing comma {1,2,3,4,}....how can I get rid of this?
this is my code:
cout << "\nArray: {";
for(int i = 0; i < currSize; i++){
cout << darr[i] << ",";
}
cout << "}";
thanks