i down loaded 24 c++ programs from the MIT ( Massachusets institute of technology) web site. when i compiled the programs all the programs are giving the same warning messages " functions containing for, while, switch are not expanded inline". if i remove the word inline from the programs will the errors be corrected and give the correct results. or is there any other way.

The inline keyword isn't a guarantee, it's a hint. If the compiler determines that inlining would produce worse code, it doesn't honor the hint. Some compilers just straight up reject the inline hint if there's a loop or troublesome lookup (ie. switch).

Welcome to the forum.

I want to broach something here. Warnings are not errors. You should look at them and decide if it's an issue or not. In this case, deceptikon is right on. But I want to broach the fact that a warning is just that and may not be an error.

@rproffitt - unless you set the compiler switch to treat all warnings as errors... :-)

@rubberman. Me, overseas at a supplier and this gem.

"Errors and warnings are costly to fix so we just test our software more."

Yup, big savings. We had a dozen folk from our company travel 6 thousand miles for this. My favorite was uninitilized variables. Found way too many of that one. Since when was that OK?