General C++ Programming (Page 5)

by volang
Setting values inside namespace/structs
Why is it possible to do following: namespace G { int a = 20; }; But not: namespac...
[2 replies] Last: In C99 (and C++20) you can do: timeval timeout = { .tv_sec = 20 }; ... (by kbw)
How to google things and apply the answers to solve your own challenges?
Hello guys, The title says it all, I have noticed that things that I look for and apply take weeks ...
[2 replies] Last: In short, you have to think . You usually can't just cut & paste som... (by dhayden)
ModernCppStarter & PVS-Studio Static Code Analyzer
The ModernCppStarter team suggested a Pull Request for ModernCppStarter on introducing the PVS-Studi...
[no replies]
recursive function and double linked list
Hello guys,I have doubts on how to do the function below can you help me? Consider a doubly linke...
[1 reply] : Please don't double-post. Use this thread only: http://www.cplusplus.c... (by Ganado)
how to represent a monetary type in C++?
Hi, No, I don't think using double is enough because the decimal part is an approximation in doub...
[3 replies] Last: The thing about a fixed point representation is that you have to set a... (by helios)
Return type of generic function
I want to write a generic function where I can specify the return type like float, double... but get...
[4 replies] Last: Thanks TwilightSpectre , that's even better. (by Learner2)
[SDL] bugs with objects colliding
hey guys, I created two rectangle objects, I wanted to achieve random acceleration in random direct...
[9 replies] Last: do you think this is a viable solution? (by adam2016)
crossword puzzle (1,2,3,4,5,6)
Which loop? You have several in your code, and I don't see any of them which looks like it has any ...
[102 replies] Last: I created a workspace for this project: (by oneidacharisse)
random in class member function (1,2)
Hello what is the best place for srand(time(0)); in the main function ? at the beginning of the prog...
[22 replies] Last: I hope they add some novice-friendly APIs to <random> in a future ver... (by Furry Guy)
what is a type with value semantics?
what is a type with value semantics? and how does it differ from other types? should types with val...
[4 replies] Last: thanks a lot Cubbi, great references!! (by JUANDENT)
Random Number sorted and drawn as a sign
Hi, i'm trying to programm a game. For that i need random numbers sorted, so the biggest number is ...
[7 replies] Last: #include <iostream> #include <string> #include <sstream> #include <ct... (by lastchance)
Pages: 1... 345
  Archived months: [jun2020]

Cannot post in this page. To post a new message, go to the first page.