c++ #include <iostream> #include <fstream> causing compie errors when used in project

i am having a program around a treeview project which comes from http://www.codeproject.com/Articles/177603/Win-Editable-TreeView-and-ListView-Merged-as-One,  code download from http://www.codeproject.com/KB/tree/Win32TreeList/TreeListSrc.zip
i am using vs2008 and and have struck a problem using the commands #include <iostream>
#include <fstream>  have tried in the cpp and the h file to see if there was some sort of precompile problem but makes no differentce still crashes out
these are the includes that are in the solution as you will see by the download
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>

#include "Container.h"
#include "Resource.h"

//#include <iostream>
#include <fstream>  so <fsream> crashes at
c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(39)

#include <iostream>  crashes out at
//#include <fstream>
>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2143: syntax error : missing '{' before


have also copied
#include "stdafx.h"
#include "Form1.h"
#include <windows.h>
#include <stdio.h>
#include <stdarg.h>
#include <time.h>

//#include "Container.h"
#include "Resource.h"
 
across to the working forms project but it compiles ok so not sure what is going on there
any help would be appreciated, thanks for looking at my question


1>Container.c
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(39) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(41) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(41) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(41) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(41) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(41) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(41) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(42) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(43) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(43) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(43) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(43) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(43) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(43) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(44) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(44) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(44) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(44) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(44) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(44) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(45) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(45) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(45) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(45) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(45) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(45) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(46) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(46) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(46) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(46) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(46) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(46) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(47) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(47) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(47) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(47) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(47) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(47) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(48) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(48) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(48) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(48) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(48) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(48) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(49) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(49) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(49) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(49) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(50) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(50) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(50) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(50) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(51) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(51) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(51) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(51) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(51) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(51) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(52) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(52) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(52) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(52) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(52) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(52) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(53) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(53) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(53) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(53) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(53) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(53) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(54) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(54) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(54) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(54) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(54) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(54) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(55) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(55) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(55) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(55) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(55) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(55) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(56) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdio(56) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(21) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(21) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(21) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(21) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(21) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(21) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(23) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(23) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(23) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(23) : error C2059: syntax error : ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(23) : error C2143: syntax error : missing '{' before ':'
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\cstdlib(23) : fatal error C1003: error count exceeds 100; stopping compilation
1>Creating browse information file...
1>Microsoft Browse Information Maintenance Utility Version 9.00.30729
sydneyguyAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

evilrixSenior Software Engineer (Avast)Commented:
I assume Container.h is an application header not a standard header?  The problem is almost certainly in there (or one of the headers it includes). It's going to be something like a mismatch of open/close brackets.

As a tip, try to always order you headers from most generic to least generic. In general, this is the order I use...

C headers
C++headers
System headers
3rd party headers
Application headers

The idea is to try and prevent less generic code "polluting" standard (more generic) code. It won't fix your current issue but it should prevent it manifesting in code you don't own.

Unfortunately, with this type of problem there are normally only two ways to find the issue. First, try reformatting the code using Visual Studio's in build tool to see if a missing (or extra) bracket stands out.

If all else fails try bisecting the code by commenting out the block and then uncommenting half and see if the error goes away. Continue doing this (you are basically doing a binary seach) until you narrow down the offending line. You may have to hack the code a little to get it to still build as you comment sections out.  First of all just try isolating it to a single header the a code block and finally a line.

Good luck, I know just how frustrating this type of error can be!

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sydneyguyAuthor Commented:
thanks for the help, i decided that i am spendingnn to much time trying to get the different versions talking to each other so i loaded up vs2003 which seems to do the job just fine to do what i need to do, so it runs i just have to get the text file writing to the txt file and i can start looking at the functionality
thank for the help
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C++

From novice to tech pro — start learning today.