Search Results

Search: Posts Made By: yifangt
Forum: Programming 01-25-2018
1,855
Posted By yifangt
Thanks! I'm surprised the problem seems to be...
Thanks!
I'm surprised the problem seems to be with the higher precedence of the operator "<<" in this case cout << tmp_int << ((j+1)%20) ? "\t":"\n"; which needs to be bracketed as cout << tmp_int...
Forum: Programming 01-25-2018
1,855
Posted By yifangt
Concatenate integer and space/newline for cout in C++
I'm trying to print out integers and space/newline for a nicer output, for example, every 20 integers in a row with ternary operator.
In C I could do it with:printf("%d%s",tmp_int, ((j+1)%20) ?...
Showing results 1 to 2 of 2

 
All times are GMT -4. The time now is 08:06 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy