General C++ Programming - January 2022

what concept should I write in C++20 to make sure a template parameter is the instantiation of a template class C
 
Hi, I have this code: template <typename T, typename ...RefBy> requires (???)) struct Tabl...
[no replies]
Double Linked List, Swaping Nodes
 
Edit: Another shitty "post, delete and run away" drive-by pissed on the forum and made a meaningless...
[1 reply] : Writing some code as debugging scaffold would help. Use it to dump in... (by JLBorges)
by RoboDo
Execute List of Arbitrary Methods from Arbitrary Objects
 
Hello, I wish to implement a list of pointers which point to methods from a diverse collection of ob...
[10 replies] Last: > is there isn't a way to store or pass a member function pointer gene... (by JLBorges)
by frek
C++ basic multithreading
 
Hi all, In this following piece of code: #include <iostream> #include <thread> static bool finis...
[10 replies] Last: > Do translation units use storage areas (apart from their static vari... (by JLBorges)
Currency Conversion Calculator
 
I'm halfway into my assignment and I'm not sure what else to do, how to finish the assignment. I'm c...
[no replies]
by atiger
split vector and store words
 
I am trying to read a text file and then store each line into a vector then split that vector and is...
[2 replies] Last: The main issue is what constitutes a 'word'. Is dog the same as Dog t... (by seeplus)
some struct problem
 
Currently, I am working on an assignment. but I encounter a problem of returning the value of longes...
[5 replies] Last: ok i will try, thanks! (by pokemon629)
math & printif
 
Hi im trying to calculate and show this equation y(x)= 3*x2+3*x-1 for following x the formula x = ...
[8 replies] Last: As an aside, I ran into an math expression evaluator library: https://... (by kbw)
Math: how rotate a 3D point? (1,2)
 
from these image i did a rotation function: https://imgur.com/mNWt6GR struct point { floa...
[37 replies] Last: i need understand, on rotation or perspective: why i get several whole... (by Cambalinho)
Power & sigma
 
hi I'm trying to figure out how to make this to work basically user need to enter numer (top of si...
[5 replies] Last: Many of these summations have a direct equation that gives the answer ... (by jonnin)
by frek
Getting started learning C++ network programming
 
Hi all, I like to learn network programming but know almost nothing about it except for a few gener...
[2 replies] Last: There's several books available on Asio C++ programming. Just search A... (by seeplus)
better code with cout
 
I am calling a SELECT from Mysql and the row is having three fields. Just for test, the third fiel...
[1 reply] : The first thing would be to show decently formatted code. If you want ... (by salem c)
by thugsy
How do I safely make a thread with a loop that awaits input?
 
Hey there, im making my first c++ based fullstack app and I have a problem where I need to wait for ...
[1 reply] : #include <iostream> #include <thread> #include <functional> #include ... (by JLBorges)
Build a tree
 
Implement a complete tree—one that is completely full except possibly on the right end of the bott...
[1 reply] : That's called a self balancing tree . Look up the algorithm and get ... (by kbw)
Manipulating a String by Reversing the Word Order Help
 
Hello. Can someone help me with this problem below? I'm currently studying how to manipulate a strin...
[3 replies] Last: Reversing the word order is just one step more: find where the words... (by Duthomhas)
coin smallest
 
I am trying to find the amount here. Input The first line of input contains an integer M, the numb...
[14 replies] Last: I was checking with some random test case here, but it seems there is ... (by leo2008)
by isv
How to pause and unpause my console on the desired key
 
I want to pause my program on the 0x32, 0x33 and 0x34 key and make it work again on the 0x31 key, ho...
[1 reply] : you can't stop the program AND also have it respond to input. howeve... (by jonnin)
Simplifying Radicals Program (1,2)
 
hello, I have a homework question which is to create a program that lets the user enter the degree o...
[20 replies] Last: ... and the 'moral of the story' is of course to get your algorithm de... (by seeplus)
Reading numbers from a date
 
So I am given a date of "June 10, 1960". My job is to write a program that takes "6/10/60" as the us...
[4 replies] Last: For entering time/date, there's also std::get_time manipulator where t... (by seeplus)
by RicoJ
Why does std::declval<int&>() returns lvalue reference?
 
Below the return value is “is lvalue”. However, in the documentation, (https://www.cplusplus.com...
[4 replies] Last: Scott Myers has a whole section on reference collapsing in his book "E... (by seeplus)
January 2022 Pages: 1234
  Archived months: [dec2021] [feb2022]

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