This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Issue with g++/gcc 5.2.0 on cygwin about string and std cout
- From: Tim Prince <n8tm at aol dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Thu, 1 Oct 2015 22:14:35 -0400
- Subject: Re: Issue with g++/gcc 5.2.0 on cygwin about string and std cout
- Authentication-results: sourceware.org; auth=none
- References: <1443746151 dot 90662 dot YahooMailBasic at web164901 dot mail dot bf1 dot yahoo dot com>
- Reply-to: tprince at computer dot org
On 10/1/2015 8:35 PM, Pat. N. wrote:
> Hi,
>
> I'm running my C++ program on Cygwin, using g++ compiler version 5.2.0.
>
> The std::string is hiding the output of std::cout.
>
> For example, this simple program should show an output, but it's showing any:
>
> #include <iostream>
>
> int main()
> {
> std::string as = " 12345";
> std::cout << "ABC" << as << std::endl;
>
> return 0;
> }
>
> We should see "ABC 12345" but instead, we see "".
>
> I don't know if the issue is on my side or on the g++/gcc side.
>
> Did I do something wrong?
This example produces your expected output using the g++ 5.2.0 from
setup.exe on my installation.
One thing that's difficult about these gcc test versions is the need to
go all the way down the list and install the 5.2.0 version of
everything, including gcc-core, g++, libgcc, libsupc, libstdc++ .... and
to do it over and over again every time you update some other cygwin
component.
--
Tim Prince