g++ tons of errors while no error in visualC++

Hi,

I have not error in visual C++ but when i want to compile using g++ in linux using:

g++ -c pressure-correction.cpp BICG.cpp advance_Continuity.h solver_Setup.h initialize_MPI.h initialize_Variables.h BICG.h boundary_Conditions.h momentum_Predictor.h obtain_Velocities.h read_Grid_Setup.h getdeltap_Using_Energyequation.h update_Pressure_Momentum_Centervelocity_Facenormal velocity.h S1.h check_Convergence.h

I get tons of errors like:

S1.h:22:2: error: expected unqualified-id before ‘for’

S1.h:22:15: error: ‘m’ does not name a type

S1.h:22:49: error: ‘m’ does not name a type

S1.h:26:7: error: expected unqualified-id before ‘for’

S1.h:26:20: error: ‘i’ does not name a type

S1.h:26:54: error: ‘i’ does not name a type

S1.h:35:4: error: expected unqualified-id before ‘for’

S1.h:35:17: error: ‘i’ does not name a type

S1.h:35:51: error: ‘i’ does not name a type

S1.h:474:2: error: ‘BICG_Solver’ does not name a type

S1.h:475:2: error: ‘BICG_Solver’ does not name a type

S1.h:476:2: error: ‘BICG_Solver’ does not name a type

S1.h:477:2: error: ‘first’ does not name a type

please help me

Kind Regards,

Farshad