Message from C, C++ talks

June 2019

— '->' 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 .

— Okay

— 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 = asignee
lvalue = left value = assigned to

— '' implies that it's of a single character size