Missing \begin{document}, \maketitle in LaTeX

The following code is giving me the error in the title:

\documentclass{article}

\title{Test}
\author{Test}
\maketitle

\begin{document}
content...
\end{document}


Now I'm a complete noob when it comes to LaTeX, so I just want to get started writing simple articles for my classes. I'll provide any information you guys need to help me fix this, but I might need pointers as to where to look.

I googled "latex", clicked the first link, found a reference to an installer package where the file was called ProText, which installed MiKTeX and TeXstudio.

\documentclass[11pt,a4paper]{report}

\begin{document}
\title{How to Structure a LaTeX Document}
\author{Mikkel Winther}
\date{November 2015}
\maketitle
\end{document}


Please try this, with the title and other features inside the begin{document}

• At first this didn't fix it. Then I closed the program, went to the document folder, deleted file I had saved and the files the program had produced, and now it works. Is there something I'm missing? It does work now. – Mikkel Winther Nov 19 '15 at 15:28
• With latex you need to re-compile every time you make changes before you view the pdf output. Some editors are buggy and require that you compile it multiple times (2 or 3 times clicking). – drscaon Nov 19 '15 at 15:31