>I hate it when people place the brace { on the same line as the expression
Get over it. Style issues are a matter of opinion, and you shouldn't push your opinions on other people.
>I wonder if that is hanging you up.
That's legal C++. 0 will be returned by default if the compiler supports that feature from the standard. Of course, if Turbo C++ v.old_as_dirt is the OP's compiler, it's undefined behavior.
>cout<< series(i) <<endl;
What is series? Is it a type? Is it a function? Most likely your problem is in the code that you neglected to post.
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004