General C++ Programming - June 2019

by frek
Returning a local variable from a function
Hi all, What's the obvious rule about returning a local value, be it a normal variable or pointer, ...
[14 replies] Last: I used to use inline / forceinline keywords a lot, but a long time ago... (by jonnin)
Why is this not ok
why the first construction is ok but second is not? auto p(std::find(v.begin(), v.end(), 5)); int ...
[3 replies] Last: #include <algorithm> int main() { int v1 {1, 3, 5, 7, 9}; ... (by dutch)
Update game content
Hi people! My question is this: when a programmer creates a game in Java and leaves it on the intern...
[1 reply] : The reason the game will simply update when online is because the game... (by zapshe)
by helios
Can Convert outlook 2016 OST to outlook 2019 PST?
This is a programming forum.
[3 replies] Last: [quote=helios]This is a programming forum. You sure about that? At t... (by Furry Guy)
Variable value NOT returned from function
I wrote a Nonogram game, also known as Picross or Griddlers, that are logic puzzles.. Anyway, the ma...
[9 replies] Last: @poteto I hadn't noticed I put that piece of code into the Fill_Grid... (by whitenite1)
cout center alignment
I was wondering if there is an easy way to center your cout? Like dumb it down for me please lol.
[7 replies] Last: On Windows and any sane *nix system, you can use the code from my Gosp... (by Duthomhas)
Dereferencing (?) error in code
Hello there. So this is an assignment for my physics course at uni wherein you have to write a piece...
[2 replies] Last: Thanks so much man, it found the mean correctly after using what you s... (by zakinithos)
i have an error in the progeam
And precisely which line is 29? Please use tags. Your stated error is the least of your pro...
[2 replies] Last: [URL=""]w88 | [URL=" (by tectonny)
Best way writing an assembler for a virtal machine?
Hello there! I wrote a virtual machine, just for fun (
[2 replies] Last: Thanks for your advices. I think not that the virtual machine will eve... (by nuderobmonkey)
by frek
Classes and rules (1,2)
Hi all, I'm rather new to this case and am struggling to figure it out so that I can use it in prog...
[29 replies] Last: All the thing related to the issue I discovered there is this: first ... (by frek)
Compile Error When Passing A Member Function as a Callback
Hi friends, Basically, I want to pass a callback to a function and I'm getting an error. Could you ...
[3 replies] Last: Consider using a templated callback, and invoking it with std::invoke... (by JLBorges)
C++ Pointer and Structure
A structure person is defined in a program. An array of pointer to person, p is created for me to st...
[4 replies] Last: @MikeyBoy Because programmer35 is very inexperienced and thinking abo... (by Repeater)
Linked list only printing out data of three of the nodes
I am trying to fill a list with integers that range from 1 to N. When I try to print out every eleme...
[3 replies] Last: I meant to thank you both for the help. I haven't been able to return ... (by vaderboi)
by diles
Conditional statement not working
Hello. I am working on a solution that I cannot get an if() condition to work. The condition is true...
[3 replies] Last: lastchance thank you. doug4, thank you as well. I made the changes a... (by diles)
How to print your output at end of a file in new line
I want to add a new line in file so i can print output results. Basically i am using same file for i...
[8 replies] Last: ios::app is funky looking, but all it is doing is fetching a constant ... (by jonnin)
gave up solving this /explain:
int x,value; int a=0,b=0,c=0,d=0; for(x=10240953;x!=0;x=x/10){ value=x%10; switch(value) ...
[6 replies] Last: @dhayden : your comment was so helpful very detailed and accurate , I... (by Reem Alnuaimi)
by ayub69
Hashtable duplicate
When ever I run displayHash() function on a second file, the data from the previous file is still sh...
[1 reply] : Yeah, you really need to use the [co de] tags if you're dumping 100'... (by salem c)
by Dexu5
Adding 2 double values returns an Integer ?
I'm adding 2 double values but the output is an integer value. #include<iotream> int main() { do...
[4 replies] Last: Thanks for the solution JL Borges. (by Dexu5)
Noexcept Function Calling a Function That Can Throw.
Is is good practice to declare a function as noexcept even if it calls a function that can throw? ...
[3 replies] Last: Is is good practice to declare a function as noexcept even if it ca... (by mbozzi)
CRTP "interface" for delete operator? (1,2)
I am using a third party library that includes the source code which I need to alter. The main reas...
[20 replies] Last: @dhayden and yet, you think you can write a better general purpose m... (by primem0ver)
June 2019 Pages: 123... 5
  Archived months: [may2019]

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