Question:
help with c++ when I write "#include " is has an error that say declaration syntax error
Patricia
2007-12-15 03:09:13 UTC
when I enter #include it says, Error C:\TC\INCLUDE\IOSTREAM.H 38: Declaration syntax error

it has like more than 20 errors. but they are all thesame. it say declaration syntax error

But I have no probelm with #include

How do I fix this? Please help me! By, the way I'm a beginner we were force to learned this subject because it is part of our computer class.
Four answers:
2007-12-15 09:37:09 UTC
It's not complaining about your program, it is complaining about line 38 of iostream.h having a syntax error. Since that is a c++ system header perhaps your system is misconfigured or there is some compiler specific steps you need to take.
icutbrains
2007-12-15 11:15:23 UTC
Unfortunately debugging programs is a pain. Often the actually error is not in the line reported but causes the break in that section. Double check all of you semi colons and see if you left some out. Often the simplest way to start.



Good luck.
mommy2kaleb04
2007-12-15 11:20:09 UTC
try:



#include

using namespace std;





its because not all compilers are the same and there are different ways to write some syntax.



#include



is for older compilers and older syntax
v.a s
2007-12-15 17:54:20 UTC
did you save the file with a .c extension or a .cpp extension cause this can cause a violation


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...