Posts by Diego Ferreira • 146 points
6 posts
-
2
votes1
answer97
viewsA: Correct regex in C++ returning 0
Regarding your regular expression you should use \\ instead of \, regarding the code the error is in the use of std::regex_match, according to the documentation found here, it only searches for…
-
1
votes1
answer100
viewsA: "Skeletonize" figures
I don’t know if this is exactly what you wanted, but it might help you get what you expect, that was the result: The approach that I followed was to each step accomplished, generate an image so that…
-
1
votes1
answer376
viewsA: Error in income tax program in C
Edit: as quoted in the comments you should also initialize the variable cont for the correct average calculation. And you’re doing the verification on my point of view unnecessary that way:…
-
1
votes1
answer45
viewsA: Array values are reset when displaying
Look at the loop while that you programmed the variable cont will iterate until it is smaller than the variable i( which is the variable that receives the product registration number ), only the…
-
2
votes1
answer130
viewsQ: Why does the operating system leave it to the programmer to deal with racing conditions?
That doubt came to me after that question: What is a racing condition? From my point of view then correct me if I’m wrong, for the kernel everything is read or written, hence also the reason for the…
-
1
votes2
answers1571
viewsA: Reading Binary File in C++
Note: I wrote a code based on what you said, that I wanted the code to do. to better demonstrate the response in terms of C functionalities++. Details: You said you’re programming in C++ but is…