Beginners - March 2020 (Page 8)

by LoMoyi
Using C++, how to randomly generate either one, two or three digits.
 
Using C++, how to randomly generate either one, two or three digits. -----------------------updated ...
[5 replies] Last: "I need X digits" is a vague statement. It can be integer digits or d... (by deleted account xyzzy)
Worker Threads: What?
 
Basically I was too lazy to include the <chrono> header, but I have to wait for some time. The thing...
[17 replies] Last: Actually this is the finished product. Lol. #include <mutex> #inclu... (by highwayman)
Double a Stack
 
I have a function push()that adds entries to a stack. I am trying to double the size of the stack wh...
[7 replies] Last: Thank you for your help. I appreciate it! (by stoneJax)
std::remove but specify max elements to remove?
 
std::remove will 'remove' every matching element in a container, how can I specify that it removes u...
[3 replies] Last: #include <iostream> #include <vector> #include <algorithm> using name... (by lastchance)
lock vs try_lock
 
I think I’ve messed up my understanding of try lock and lock in mutexes. Does lock wait until it...
[2 replies] Last: Awesome ok, thank you! :) (by highwayman)
by Bopaki
The function "removeElement" is not doing it's job
 
Here is what I get in the output: Value #1: 15 ". 2: 10 ". 3: 5 " 4: 3 Item to ...
[3 replies] Last: You can greatly simplify the remove function. Instead of keeping a poi... (by dhayden)
move objects to unordered_map without creating copies
 
Hi experts, I'm a beginner of C++. I have some questions while trying to insert some objects to a...
[1 reply] : map.emplace(1, std::move(t1)) (by mbozzi)
updateAccount() member function has no output
 
I need to turn a struct into a class. The class needs to display bank account details - first cheque...
[3 replies] Last: The output only shows me the information in int main You never cal... (by TheIdeasMan)
Reading numbers from a file
 
Hi, I'm trying to read some numbers from a file called numbers.txt. There are 10 numbers in this fil...
[3 replies] Last: [quote=bobcat854]I was just wondering what exactly was the logical err... (by lastchance)
linked list
 
im trying to create a overloaded assignment operator of a linked list with this struct struct i...
[4 replies] Last: im trying to create a overloaded assignment operator of a linked list... (by Enoizat)
Linked list delete item
 
Hi, I finally have some time, thanks to COVID-19, to go back and cement sections into my brain. Thi...
[3 replies] Last: Oh, of course. It's obvious once pointed out. Thanks fellas. (by jjordan33)
Calculate average and use multiple int
 
I want to create a new project in C++, but i have a little problem. My project is about university ...
[7 replies] Last: main.cpp compiles when it's this: #include <iostream> #include "Stude... (by dhayden)
by larryl
Template Class Member Confusion
 
Hello Folks: I don't use templates very often. I'm doing something stupid. Visual Studio doesn'...
[4 replies] Last: Thanks again coder777: I need to get up to find some time to learn ne... (by larryl)
String Literals
 
Are string literals put on the stack? Dose that mean that they automatically - uh - disappear like r...
[2 replies] Last: that you've attempted to cast away. XD ya know that about sums up t... (by highwayman)
Well guys I'm stuck
 
the error I'm receiving is error: 'class PacketProcessor' has no member named 'SetSeqStart'| any ide...
[2 replies] Last: Hello itachix, The question is which file is this line of code giving... (by Handy Andy)
by BP138
A little lost on how a program/classes should be structured.
 
I'm making a small game with SFML just as a learning project. I'm doing decent so far but one thin...
[2 replies] Last: When the bullet is in the player's clip or gun, the clip or gun owns i... (by dhayden)
code error help
 
I'm getting this error when trying to compile does anyone know a solution? 420|error: cannot co...
[2 replies] Last: Thank you for helping it worked (by itachix)
by mpg
Some exercise about complexity
 
Excuse can you tell me about these exercises that I have done, are they all correct? Many thanks!! ...
[7 replies] Last: I no longer have an opinion of right or wrong. I am just letting you ... (by jonnin)
Wanting help with sockets for a project
 
So I'm trying to make a function that creates a socket, and then uses a switch statement in order to...
[15 replies] Last: well I now have a kinda slimed down function for using the Networking ... (by VaasKahnGrim)
March 2020 Pages: 1... 678910... 14
  Archived months: [feb2020] [apr2020]

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