General C++ Programming - July 2019

Removing character from string by his index
I have to remove a character from string and i know his position in string (index). On google i foun...
[3 replies] Last: Thanks i did it. (by Aleksa03)
value of variable did not reset!
I got a function that assign a to 1 if it is 0, but when I call it again, a is already 1. I thought ...
[2 replies] Last: I thought once it exits the function, all the variables in it would r... (by dhayden)
Automatic destroy of global vectors
I have a case where I am declaring an std::vector as global. Precisely, vector is an collection of s...
[3 replies] Last: At the end of main, destructor of that vector gets called, which is f... (by dhayden)
Point xt::xtensor container and xt::xarray container to same memory location.
Hello everyone, I am working in an optimization project which uses xtensor library to deal with la...
[1 reply] : What is it that can be done in xtensor that can't be done in xarray, o... (by dutch)
What is the proper syntax for std::get_if on a std::shared_ptr< std::variant<...> >?
The following code is pretty self explanatory, I'm getting some compiler errors when trying to compi...
[3 replies] Last: Thanks TheDaemoness and dutch, that's compiling for me, and cout'ing t... (by AaronZim)
by Ashmor
Tetris clone
Hey guys. Programmer-hobbyist here. I made a Tetris clone in C++/SFML in my spare time. Here's a lin...
[5 replies] Last: @TheDaemoness, Thank you very much for the feedback! This is very help... (by Ashmor)
The CPU displays more turns than human in the Tic-Tac-Toe board
Hi there. I am having a problem with the number of turns the human and CPU displays on the board in ...
[7 replies] Last: You can do this by returning a char or an enum. the concept here is s... (by jonnin)
ofstream to ofstream assigment..??
I want to assign a ofstream to a ofstream of a routine as shown below. //CLPOut is also of type o...
[3 replies] Last: Thanks to salem ,mbozzi.. I understand the compiler abuses now. (by Ignorant)
How to display turns of CPU and Human on board in Tic-Tac-Toe
Hi.I am making a Tic-Tac-Toe game in C++. So far my program can display the board but it doesn't dis...
[3 replies] Last: Thank you for your feedback. (by kabirdevramana96)
gcc flags for specific msvc compiler warnings
I'm looking for the gcc equivalent to 4 different compiler warnings that i am experiencing when usin...
[5 replies] Last: Thank you everyone for the replies. (by tomharvey27)
csv file management for appending values.
I have a software which extracts following value in a csv format on a daily basis. NAME,TYPE,ITEM...
[2 replies] Last: or, similarly, make an array of output files and open them all. then ... (by jonnin)
by Odglog
How to edit scripts after release? (1,2)
Hi I know I asked a question lately and asking again isn't that good but it's important. My questi...
[25 replies] Last: AngelScript is a scripting language whose syntax is very similar to C+... (by Ganado)
How to detect 'Idle' status in Mac (Qt\C++ application)
Hi, I have a C++/Qt application for Win & Mac where I need to know if the user is in an 'idle' ...
[2 replies] Last: the OS tracks this, somehow, somewhere. there is probably a way to as... (by jonnin)
Converting strings to char
Hello, I am coding a MIPS processor in C++ and I am taking in instructions from a text file. I nee...
[2 replies] Last: You can mix and match, but it is not generally recommended. The bigge... (by jonnin)
by frek
GitHub for me as a C++ programmer
Hi all, I just want to create an account on GitHub with my name. Is it too late for a one or two-ye...
[8 replies] Last: [quote=frek]No one knows the projects each company all over the world ... (by Cubbi)
Successive over-relaxation especially relaxation parameter
Hello, I use Successive over-relaxation (SOR) for large matrices up to 1E+05 x 1E+05 matrix element...
[9 replies] Last: Then add "C++ library" to the search. Try different wordings. We are u... (by dutch)
sorting ascending and descending
how to sorting ascending and descending? i really not understand, this is my code.. #include <iost...
[1 reply] : the default compar... (by jonnin)
Getting wrong result while adding the sum of the ascii values of a string
//I have written a code to print the sum of the ascii values in a string but I keep getting a wrong ...
[2 replies] Last: @Ganado, I found my mistake.. Thanks.. (by philip92)
Failing C++ Tests
Hi, really frustrated, I keep failing tests, I know C++ I have 7 years dev experience with it on ...
[2 replies] Last: Ive coded in c++ since the late 80s (c with cout style admittedly) and... (by jonnin)
Programmation C++ Tableaux
J'ai un problème de programmation C++: fichier et tableau Pourrai-je l’exposer ? Quelqu’un pour...
[4 replies] Last: Yeah no problem I will help you. You can also use (by Zaap)
July 2019 Pages: 123... 5
  Archived months: [jun2019] [aug2019]

This is an archived page. To post a new message, go to the current page.