Copying a string

I was wondering if I can copy a string to another string without having it be set to a different string. Here is an example:

string dividend;


dividend = removeLeadingZeros(dividend);

If I do something like this:

string divTemp;

divTemp = removeLeadingZeroes(dividend);

Then it will display correctly. But I don't want to declare a separate string.
Who is Participating?
hongjunConnect With a Mentor Commented:
dividend = removeLeadingZeros(dividend); will set to the same string.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.