从汇编角度分析"helloworld"+1
"helloworld"+1对应
bash
mov dword ptr [a],1
mov eax,dword ptr [a]
add eax,offset string "helloworld" (03CCCBCh)
eax地址偏移加了1,
bash
lea ecx,[test]
最终取的内存偏移地址,所以此时的test是elloword,后面调用iostream封装的字符串相加方法。
最终结果是
