Cant figure out what is wrong with the programme

This is a discussion on Cant figure out what is wrong with the programme within the C++ Programming forums, part of the General Programming Boards category; insert
Code:
It has been almost straight 6 hours since I have been working on this porgramme. But, I still ...

The reason I had to double post was because I did not know what I was doing wrong.
I am kind of new for this forum (as a matter of fact I opened my account just yesterday). When somebody said "not to write in the code tag" I did not really know what that meant. But, I think now I know what it means. So anyway this time hopefully I am doing it right. Here is the code for my failed programme:

So, when I try to compile it , it says that " In function `void DailyReport (std::vector<WeatherStation, std::allocator<WeatherStation> >&, std::vector<WeatherStation, std::allocator<WeatherStation> >&)': expected `;' before "fStation" ". So, I think the problem is in the function "Daily Report". To make it more clear, the compiler shows the error is in the second line of the For Loop I used in the function "Daily Report".

There are like three or four copies of the same code in there. I have no clue which file is the error is in. But the mistakes that stand out the most is this in the dailywhatever function

Code:

<<setw(16)fStation[K].Temperature <<

should be

Code:

<<setw(16)<<fStation[K].Temperature <<

First sorry for posting too many copies of the same programme last time. I am not sure how did that happen.
Also, thanks for pointing out the mistake and actually that was the only error in the programme. Now my programme is running fine. But, the only problem now I have is that while running the programme after I finish entering the temperature for designated weather station, it executes the function "Menu" twice. To make it more clear, after the programme calls the function "PostWeather", it calls the function "Menu' twice as opposed to once.
Anyway this time I am making sure that I will post just one copy of the programme. Here comes the code:

The program was also segfaulting when running High-Low Report after entering 12, 18, 11, 6, 27 for the temperatures, because when finding the maximum temperature, when it saw 27 as the largest, it would execute maximum = K + 1; instead of maximum = K; . The segfault occured further down because of:

As to your question about why the menu was printing twice, the problem was that when posting temperatures, you were doing "cin >> Temperature", which is fine, but it doesn't take the newline ('\n') character out of the stream, so when getline is called afterwards in the main loop, the program sees an empty line and Command is set to "". To fix this, I added cin.ignore(256, '\n') to the end of PostWeather().