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);
console.write(divtemp);

Then it will display correctly. But I don't want to declare a separate string.
igor92128Asked:
Who is Participating?
 
hongjunConnect With a Mentor Commented:
dividend = removeLeadingZeros(dividend); will set to the same string.
0
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.