Kevin McCarty <> wrote:
> On Sep 27, 9:05 pm, Brian <bcl...@es.co.nz> wrote:
>
>> Thanks Kevin for taking the time to look more closely at the problem.
>> Originally I typed in all the code including the using namespace std;
>> but Visual Studio C++ did not like the line 'using namespace std;' I will
>> in future write down the error message when something goes wrong.
>>
>> --
>> Regards Brian
>
> All I can say is that it works for me with VC++ 10 (Visual Studio
> 2010), see my copy-and-paste from a terminal window below.
>
> I still believe there was a typo on your first try... but it's hard to
> say for certain, as I don't think you ever provided your entire piece
> of failing code. Only hand-copied excerpts which had their own
> additional typos 
>
> One more time, when asking on Usenet (or anywhere else) about compiler
> error messages, do NOT just hand-copy them down; you need to COPY-AND-
> PASTE the error messages and also your entire piece of code into your
> post, or it is almost certain that there will be typos that prevent
> others from diagnosing the actual problem.
>
> Good luck, and sorry I couldn't help any further,
> - Kevin B. McCarty
>
>
> D:\users\kevin> type hw.cpp
> #include <iostream>
> using namespace std;
>
> int main()
> {
> cout << "Hello world!" << endl;
> return 0;
> }
>
> D:\users\kevin> cl /EHsc hw.cpp
> Microsoft (R) C/C++ Optimizing Compiler Version 16.00.40219.01 for x64
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> hw.cpp
> Microsoft (R) Incremental Linker Version 10.00.40219.01
> Copyright (C) Microsoft Corporation. All rights reserved.
>
> /out:hw.exe
> hw.obj
>
> D:\users\kevin> hw.exe
> Hello world!
When I get a spare moment I hope to try entering the code again but this
time I will write down any error messages.
I tend to send e-mail on my iPad so its not possible to cut and paste
between two computer and I have the newsgroups setup on my iPad. But I
could e-mail it to myself and receive the e-mail on my iPad then cut and
copy it to this newsgroup.
The reason I use a iPad is that its ready to use as soon as you switch it
on and its very portable, light in weight.and not too big.
--
Regards Brians