>> #include <iostream>
>> int main()
>> std::cout << "Hello, world!" << std::end;
>> return 0;
> Umm...what is the reason for the "<<std::end;"?
> Why not simply...
> std::cout << "Hello, world!";
> You see, when I build that app from an ms-dos prompt the compiler
doesn't recognize a
>function called "end",
> as such a function is not, afaik, part of the Standard C++ library.
> note: helltest.cpp is what I called the helloworld.cpp source code
> C:\TEMP\hello>...\mingw\bin\g++ helltest.cpp -c -o helltest.o
> helltest.cpp: In function `int main()':
> helltest.cpp:4: `end' undeclared in namespace `std'
Sorry std::endl not std::end, I didn't copy and paste that's why :)
> I did reproduce the error under Win98.
> Have you considered modifying the system path ($PATH) to include (in
>c:\mingw\bin before you
> launch the Mingw IDE?
What about if you have other GNU tools .(like DJGPP)?
This can cause the problem.
> The sort of thing mentioned here usually means that g++ is not able to
find (in this case)
> directory. c:\mingw\bin (in this case), as you probably know, is where
as.exe (as.exe is
>included with Mingw-3.0 rc3)
> is usually kept.
Yes, I know but I have never added it before for previous version of
> However, by adding c:\mingw\bin (in this case) to the beginning of the
>variable, the inability of
> g++ to find as.exe went away.
Yes, in my case it solves the problem too. But in my user case I was told
that it didn't.
(Please read the thread
I told the user the same thing (adding Mingw\bin path).
> A quick fix, even though it is not part of the installation, is to
simply add a .bat file
>somewhere that sets the
> PATH variable before you begin building/compiling applications. Either
that, or modify
>whatever it is that is being
> used to launch Mingw IDE and reset the PATH variable there.
> It might look something like this:
> @echo off
> Reminder: This will launch an ms-dos console window
> Reminder: This is for Win98/Win98SE/WinME
Well, I know that this solves the problem but I still prefer the same way
(No need to add any path).
Thank you very much,