32423423523

123
}12342423424234
Last edited on
You could just use std::string instead of char right from the start.

Otherwise:

1
2
char grd = 'A';
std::String strGrd(grd);


strGrd is now a string with first letter 'A'.
Last edited on
I'm so sick of this. OP as follows:

How to convert char to string. I want to change A to A+, B to A-, C to A,etc.PLease help
1
2
3
4
5
6
7
8
9
10
11
12
13
void grading(double avg, char& grd)
{
if (avg>90)
grd = 'A';
else if (avg>=80)
grd = 'B';
else if (avg>=70)
grd = 'C';
else if (avg>=60)
grd = 'D';
else
grd = 'F';
}

Last edited on
so can u fix it for me?
We already told you how to do it, and then you deleted your posts above, and now you want us to help you again straight away?

http://cplusplus.com/articles/oGLN8vqX/
Last edited on
Topic archived. No new replies allowed.