From: Vladimir Jovic on
moonhkt wrote:
> On 3月10日, 下午5時36分, i...(a)localhost.claranet.nl (Ike Naar) wrote:
>> In article <aedda404-2ef8-4e07-9afa-0b2547e34...(a)c34g2000pri.googlegroups.com>,
>>
>> moonhkt <moon...(a)gmail.com> wrote:
>>> On 3月10日, 下午2時55分, Ian Collins <ian-n...(a)hotmail.com> wrote:
>>>> On 03/10/10 07:50 PM, moonhkt wrote:
>>>>> Hi All
>>>>> Do you know why #include file<iostream.h> not found. ?
>>>> Possibly because it is an obsolete header. No recent code should be
>>>> using it.
>>>> --
>>>> Ian Collins
>>> So, Do you know what is replacement for iostream.h ?
>> Have a look at the C++ FAQ. Your question is answered in
>>
>> http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.4
>
> Try on our machine , Still have error.
>
> cpp a02.cpp
> "a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found.
> #line 3 "a02.cpp"
> int main( int argc, const char* argv[] )
> {
> }
>
> cat a02.cpp
> /* cpp a02.cpp -o a02 */
> #include <iostream>
> int main( int argc, const char* argv[] )
> {
> }
>
>
> [shkdev2:/home/ericl6/shell]

Don't make us pull the bits and pieces with pliers.

What error do you get when you compile your second example?
What OS are you using? What compiler?
etc
From: Ben Bacarisse on
Vladimir Jovic <vladaspams(a)gmail.com> writes:

> moonhkt wrote:
>> On 3月10日, 下午5時36分, i...(a)localhost.claranet.nl (Ike Naar) wrote:
>>> In article <aedda404-2ef8-4e07-9afa-0b2547e34...(a)c34g2000pri.googlegroups.com>,
>>>
>>> moonhkt <moon...(a)gmail.com> wrote:
>>>> On 3月10日, 下午2時55分, Ian Collins <ian-n...(a)hotmail.com> wrote:
>>>>> On 03/10/10 07:50 PM, moonhkt wrote:
>>>>>> Hi All
>>>>>> Do you know why #include file<iostream.h> not found. ?
>>>>> Possibly because it is an obsolete header. No recent code should be
>>>>> using it.
>>>>> --
>>>>> Ian Collins
>>>> So, Do you know what is replacement for iostream.h ?
>>> Have a look at the C++ FAQ. Your question is answered in
>>>
>>> http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.4
>>
>> Try on our machine , Still have error.
>>
>> cpp a02.cpp
>> "a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found.
>> #line 3 "a02.cpp"
>> int main( int argc, const char* argv[] )
>> {
>> }
>>
>> cat a02.cpp
>> /* cpp a02.cpp -o a02 */
>> #include <iostream>
>> int main( int argc, const char* argv[] )
>> {
>> }
>>
>>
>> [shkdev2:/home/ericl6/shell]
>
> Don't make us pull the bits and pieces with pliers.
>
> What error do you get when you compile your second example?
> What OS are you using? What compiler?
> etc

I think in this case the OP did, in fact, give that information; or at
least enough of it to see what might be wrong.

The error is

"a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found

and the "compiler" seems to be "cpp".

To the OP: did you know that, on many systems, cpp is not a C++
compiler but the pre-processor? Did you know that if you want it to
find C++ headers you might have to run it like this:

cpp -x c++

? Did you see if "man cpp" was of any help?

I've worded the above in a vague way because exactly what cpp is and
what arguments it takes varies from system to system. It is simpler
to use the compiler. If you really want to see the PP output, most
compilers have a flag for that (-E in most cases).

--
Ben.
From: Vladimir Jovic on
Ben Bacarisse wrote:
> Vladimir Jovic <vladaspams(a)gmail.com> writes:
>
>>>
>>> cpp a02.cpp
>>> "a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found.
>>> #line 3 "a02.cpp"
>>> int main( int argc, const char* argv[] )
>>> {
>>> }
>>>
>>> cat a02.cpp
>>> /* cpp a02.cpp -o a02 */
>>> #include <iostream>
>>> int main( int argc, const char* argv[] )
>>> {
>>> }
>>>
>>>
>>> [shkdev2:/home/ericl6/shell]
>> Don't make us pull the bits and pieces with pliers.
>>
>> What error do you get when you compile your second example?
>> What OS are you using? What compiler?
>> etc
>
> I think in this case the OP did, in fact, give that information; or at
> least enough of it to see what might be wrong.
>
> The error is
>
> "a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found
>
> and the "compiler" seems to be "cpp".
>

I wouldn't agree.

Something is obviously very wrong on the OP's system, because the
"example" works.
From: Scott Lurndal on
moonhkt <moonhkt(a)gmail.com> writes:
>On 3=E6=9C=8810=E6=97=A5, =E4=B8=8B=E5=8D=885=E6=99=8236=E5=88=86, i...(a)loc=
>alhost.claranet.nl (Ike Naar) wrote:
>> In article <aedda404-2ef8-4e07-9afa-0b2547e34...(a)c34g2000pri.googlegroups=
>.com>,
>>
>> moonhkt =C2=A0<moon...(a)gmail.com> wrote:
>> >On 3=E6=9C=8810=E6=97=A5, =E4=B8=8B=E5=8D=882=E6=99=8255=E5=88=86, Ian C=
>ollins <ian-n...(a)hotmail.com> wrote:
>> >> On 03/10/10 07:50 PM, moonhkt wrote:
>>
>> >> > Hi All
>>
>> >> > Do you know why #include file<iostream.h> =C2=A0not found. ?
>>
>> >> Possibly because it is an obsolete header. =C2=A0No recent code should=
> be
>> >> using it.
>>
>> >> --
>> >> Ian Collins
>>
>> >So, Do you know what is replacement for iostream.h ?
>>
>> Have a look at the C++ FAQ. =C2=A0Your question is answered in
>>
>> =C2=A0http://www.parashift.com/c++-faq-lite/coding-standards.html#faq-27.=
>4
>
>Try on our machine , Still have error.
>
> cpp a02.cpp
>"a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found.
>#line 3 "a02.cpp"
>int main( int argc, const char* argv[] )
>{
>}
>
>cat a02.cpp
>/* cpp a02.cpp -o a02 */
>#include <iostream>
>int main( int argc, const char* argv[] )
>{
>}
>
>
>[shkdev2:/home/ericl6/shell]

cpp is the c pre processor, not C++ compiler.

scott
From: Ben Bacarisse on
Vladimir Jovic <vladaspams(a)gmail.com> writes:

> Ben Bacarisse wrote:
>> Vladimir Jovic <vladaspams(a)gmail.com> writes:
>>
>>>>
>>>> cpp a02.cpp
>>>> "a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found.
>>>> #line 3 "a02.cpp"
>>>> int main( int argc, const char* argv[] )
>>>> {
>>>> }
>>>>
>>>> cat a02.cpp
>>>> /* cpp a02.cpp -o a02 */
>>>> #include <iostream>
>>>> int main( int argc, const char* argv[] )
>>>> {
>>>> }
>>>>
>>>>
>>>> [shkdev2:/home/ericl6/shell]
>>> Don't make us pull the bits and pieces with pliers.
>>>
>>> What error do you get when you compile your second example?
>>> What OS are you using? What compiler?
>>> etc
>>
>> I think in this case the OP did, in fact, give that information; or at
>> least enough of it to see what might be wrong.
>>
>> The error is
>>
>> "a02.cpp", line 2.10: 1506-296 (S) #include file <iostream> not found
>>
>> and the "compiler" seems to be "cpp".
>>
>
> I wouldn't agree.
>
> Something is obviously very wrong on the OP's system, because the
> "example" works.

Why would it not work? cpp processes the text and gives an error
message since it can't find the C++ header. Is that not what is
happening? Looks that way to me.

--
Ben.