Re: Issue with g++/gcc 5.2.0 on cygwin about string and std cout

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




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




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux