Inflation doesn't work that way. Generally, incomes trail inflation, so over time, your purchasing power drops.
Say you have $10k today and a loaf of bread costs $1, but in 20 years, you have $1M, but a loaf of bread costs $500. Are you better off?
Don't confuse nominal values with real values.
I've lived through inflation in another country, and it makes people a whole lot poorer, whether they're renters or owners. The one set of people who do well are the guys in control of the money creation, since they have first access to it. To remind myself of this fact, I have a little envelope with $100,000,000,000,000,000 Zimbabwe dollars. They tried to print their way out of trouble too.
Are you saying its better to buy some tangible asset (like house) to guard against inflation?