— '->' isnt a valid string
— Which user would give as input
— Yeah but -> is two characters
— Is there any alternate way
Well store the input and then iterate over it or when recieving it when you encounter > check if the previous is - and in that case replace the current-1 to .
— You cannot assign to rvalue
— Whats an rvalue?
— '->' in that case
— Not a valid rvalue ;)
— But that explanation is useless for a beginner
— '->' shouldn't compile in the first place
— I know rvalue from opposite to lvalue. lvalue it's what has an address in memory and not stored temporary.
Message permanent page
— Rvalue = right value = asigneelvalue = left value = assigned to
— '' implies that it's of a single character size