Line 13: A variable dimension is not standard C++. C++ standard requires than array dimensions be known at compile time. Some compiles do allow this as a non-standard extension.
Line 17: Extraneous <<
Line 18: Missing ;
Line 23: No variable name.
Line 25: Should be j++, not j==
Line 39: What is the value of temp the first time you execute this statement? Hint: It is garbage. temp is an uninitialized variable.
When posting about compiler errors, please post the exact text of the compiler errors.
PLEASE USE CODE TAGS (the <> formatting button) when posting code.
It makes it easier to read your code and also easier to respond to your post. http://www.cplusplus.com/articles/jEywvCM9/
Hint: You can edit your post, highlight your code and press the <> formatting button.