2d
awarded Commentator
2d
comment Writing a C++ vector to an output file
@AndyProwl Shouldn't the 'c++' be outside of the if block? If not, c would never increase from 0. Also, perhaps a bool would be a better option than using an int.
Nov
14
accepted Change bash background color for alternating outputs
Nov
14
comment Change bash background color for alternating outputs
@thatotherguy Oh I see. I understand that I cannot use it practically, but could you give the details on how to do the alternating just for curiosity sake? The thick yellow line thing sounds like a reasonable solution. Could you post it as an answer?
Nov
14
comment Change bash background color for alternating outputs
so there is no solution apart from visually hunting for prompts?
Nov
14
comment Change bash background color for alternating outputs
The problem arises when the output is colored as well. For example during make install or compiling etc.
Nov
14
asked Change bash background color for alternating outputs
Nov
11
awarded Tumbleweed
Nov
4
asked Reduce communication volume of graph partition in METIS
Nov
4
awarded Supporter
Nov
4
awarded Scholar
Nov
4
accepted Allowing another user to execute program?
Nov
4
asked Allowing another user to execute program?
Oct
13
comment How to initialize vector from array without allocating more storage space?
I think this is perfect for my use case. As others suggested, I will also look into smart pointers. and supports no operations that would result in resizing or re-allocating That is perfectly fine with me.
Oct
13
accepted How to initialize vector from array without allocating more storage space?
Oct
13
revised How to initialize vector from array without allocating more storage space?
added 175 characters in body
Oct
13
awarded Editor
Oct
13
comment How to initialize vector from array without allocating more storage space?
@Slava Could you please elaborate? I think it might be worth the effort in my case.
Oct
13
comment How to initialize vector from array without allocating more storage space?
@juanchopanza The function getArray() is not really written by me. I would have personally preferred to deal with vectors completely but I am using a library function. After I get the data, I want to use vector functions on data pointed to by array so I need to initialize a vector for it. Although I am doing that currently, I want to improve the efficiency since the data is a bit large.
Oct
13
comment How to initialize vector from array without allocating more storage space?
@PaulMcKenzie I expect the data to be removed. In short, I want the data to be handled by the vector functions completely. In essence, I want to just transport all the data from array and fit it in vec.data().
1 2 3 4