General C++ Programming - November 2020

I'm programing an UNO game for C++ and I'm stuck on how to proceed
I created a github repository to collect my thoughts. ...
[1 reply] : Are we looking at the same code? Your lines 349-355 is just text. Mayb... (by Ganado)
What is the reason for the explicit template specification order / special status of first argument?
I started experimenting with the C++20 feature of concepts and was very pleased when I realized that...
[1 reply] : this was already discussed in (by Cubbi)
I am having trouble with this problem. I am stuck.
 You will be using a data file called “christmas.dat”. To copy the data file to your director...
[1 reply] : I am having trouble with this problem. I am stuck. Stuck at what po... (by seeplus)
Linked list removing problem [repost from r cplusplus]
Hello, here I have a program which takes in the head of a linked list and the value that I want the ...
[2 replies] Last: Using a prev pointer: for (Node *current=head, *prev=nullptr; cur... (by dhayden)
by dman25
Create new object with std::async
Is there a way to call a constructor and create a new object with std::async?
[3 replies] Last: Oh yeah. Or you could just return it. (by Repeater)
3D camera: i need a correction on camera size
how can i use the camera size for the window size: camera1.size.Height = Me.ScaleHeight + 100 ...
[16 replies] Last: I don't have VB. But you can easily check your code in two ways: 1. T... (by againtry)
calculate size of the data from function arguments
Hi, I am struggling to understand how to calculate the size of the data in a function given its ...
[1 reply] : It passes 2 pointers and 2 ints, therefore the size of the data passed... (by seeplus)
linking node at the end of the list
Hi all, I tried to link a new node(NewNode) at the end of the list but it is not executing the last ...
[2 replies] Last: Thank you for the information, it's really helpful. Now, I'm able to l... (by hakmaabdul)
Why is __cplusplus defined within extern “C”
Within extern "C" { } the macro __cplusplus is still defined. When I want to include the C version o...
[1 reply] : You forgot to extern "C" the definition of library_do(), thus the func... (by helios)
Is this name collision?
The error was "no instance of overloaded function "people::people" matches the specified type" on th...
[5 replies] Last: This compiles and runs OK as 1 file: #include <string> #include <io... (by seeplus)
by Bapt
Create an histogram from datas vector
Hi Everybody, I would like to print a histogram from datas vector. My vector is composed of a...
[8 replies] Last: Thanks for all !! (by Bapt)
Help with Implementing a class please
I need to write an application, which reads two times and finds out which time is later. After...
[2 replies] Last: Double posting: (by Furry Guy)
C++20: concept definition parameters seems inverted
Hi, This next concept: template <class T, class U> concept SubClass = std::is_base_of<U, ...
[1 reply] : Looks like that "SubClass" was someone's version of the standard libra... (by Cubbi)
Hello, can somebody help me, I wrote a code that calculates a^b and then finds how many digits does ...
[4 replies] Last: that too. but you fixed that already :) If the OP is going to be pla... (by jonnin)
std:: or using namespace std
Why so many people use std:: instead of just writing using namespace std at the top?
[6 replies] Last: There are a lot of names in the std:: namespace. If put using namespac... (by dhayden)
by Mante
What do I need to know when mixing C and C++ code?
// C++ code extern "C" void f(int); // one way extern "C" { // another way int g...
[1 reply] : (by salem c)
Weird compiler behavior
Recently I have stumbled across a piece of code, that puzzles me, because different compilers compil...
[2 replies] Last: The problem is one of evaluation order , not operator precedence: it ... (by mbozzi)
Beginner Level Pointer
#include <stdio.h> #include <cmath> void update(int *a,int *b) { // Complete this function ...
[6 replies] Last: @furry guy Suppose be C++. I was doing some C++ practices for some r... (by junweinehc)
replacing a character in a string
Hi How can i replace a character from a introduced string? let's say i introduce "aabcf" i want to r...
[9 replies] Last: OK #include <string> #include <iostream> #include <map> int main()... (by seeplus)
Reapating numbers
Hello, I got a task to do in my university studies, and I don't have any idea how to do it,may someb...
[5 replies] Last: That's one part of the answer - how about the rest? In this sequence ... (by lastchance)
November 2020 Pages: 123... 8
  Archived months: [oct2020]

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