> typedef int foo; > > main() > { > auto int foo; > > foo = 2; > } > > Stylistic considerations aside, why isn't foo a variable inside main, > and a type outside? Typedefs are not scoped. They define synonyms for (possibly complicated) data types. After "typedef int foo;", "foo" is just like "int".