Beginners - January 2022

Class prototype and definition
Two-part question. Both of these seem to work and I prefer the last one, can either be used in professional programs? virtual void DoubleValue() const; ...
Jan 31, 2022 at 7:18pm
[17 replies] Last: I don't know Rust, but if it compiles to native machine code, then it ... (by Ganado)
The Trie data structure
I'm trying to digest the code from this site: https://www.techiedelight.com/cpp-implementation-trie-data-structure/ I'm currently stuck near the beginning: ...
Jan 31, 2022 at 12:26pm
[4 replies] Last: in the page's view source: datePublished":"2016-12-03T04:24:19+00:00" ... (by jonnin)
HELP - Menu won't function
I have a project for c++ and I am having a hard time getting the menu to work. I have tried so many things and I just can't get it! I would really appreciate a...
Jan 31, 2022 at 10:17am
[2 replies] Last: The variables can be defined within block in which they are used. Also... (by seeplus)
How to Implement Rule
I have this project where we have to take a rule off of this website https://uic.edu/apps/strong-password/ and calculate the number of points for each Column an...
Jan 31, 2022 at 9:39am
[18 replies] Last: For VS2022: #include <iostream> #include <cctype> #include <string>... (by seeplus)
Get Only Function
I have this project where we have to take a rule off of this website https://uic.edu/apps/strong-password/ and calculate the number of points for each Column an...
Jan 31, 2022 at 9:28am
[1 reply] : [re-asked from http://www.cplusplus.com/forum/beginner/281986/ ] (by seeplus)
by janac
iterators, last vs end
When I run the code below, I get this error: Expression: cannot dereference end map/set iterator I'm confused about the meaning of last versus end, or d...
Jan 30, 2022 at 10:05pm
[4 replies] Last: Lets see: https://en.cppreference.com/w/cpp/algorithm/find template<... (by keskiverto)
Implementation of Threads
There is a program that I am doing on a Parking system in which, I want to implement a background thread that reads data from a file and gives a real-time outpu...
Jan 30, 2022 at 9:25pm
[9 replies] Last: hello, you can take a look at this example: https://mockstacks.com/... (by drdavid9)
Unable to play sound asynchronously in webcam opencv c++ (LINUX)
Im trying to play a sound in C++ opencv webcam. What I have tried : Webcam in opencv,C++. It play a wav file but since ive added "&" , therefore it keeps pla...
Jan 30, 2022 at 5:35pm
[1 reply] : https://www.cplusplus.com/reference/future/future/valid/ int play (... (by salem c)
better way to print out returned vector?
My fundamentals are still shaky and i need advice on better/simpler ways to print out the results. with reference to code below twoSum returns v, which is ...
Jan 30, 2022 at 4:33pm
[4 replies] Last: the compiler hinted that i can use a range-for-loop, which i would re... (by deleted account xyzzy)
Overloading << Operator
I'm studying how to overload the << Operator, as template function at global scope, so I can print elements of the vector by iterating one by one. it's one o...
Jan 30, 2022 at 6:35am
[3 replies] Last: thanks, lastchance (by memepapa)
Overloading () operator
I am pretty sure this is a beginner question. However, all my google searches failed me. So, here I am. To begin, let's say, I have a few function like, t...
Jan 30, 2022 at 3:43am
[15 replies] Last: @JLBorges, Thank you very much. This is good enough. (by Rakib771)
by john98
function does not return the value
i just started coding in c++. i wrote a function to approximate pi value in monte carlo method but it does not return the value. #define _USE_MATH_DEFINES ...
Jan 29, 2022 at 7:50pm
[10 replies] Last: thank you so much guys for the help. appreciate it. (by john98)
First Project, Output calculation is very wrong
hello I've decided to start coding my first project and I've chosen a currency converter. It seems to be working in regards to no errors, but somewhere along...
Jan 29, 2022 at 5:47pm
[2 replies] Last: Variables in programming are not like variables in mathematics. Calcul... (by Ganado)
by emcp
unsure how to reference my new Factory properly
Hi , I am trying to leverage a project which implements connection pooling.. and customizing it for a custom connection type source https://github.com/malikkir...
Jan 29, 2022 at 5:34pm
[4 replies] Last: Just saw this. Glad you have a workaround. I wish I knew how to get t... (by Ganado)
I Have No Clue What I'm Doing
Fair Warning, this question is a beginner crap fest. My code is completely nonfunctional due to my general lack of knowledge. Please just skip if this seems...
Jan 29, 2022 at 4:16pm
[9 replies] Last: I should read up on how include works. https://www.learncpp.com/cpp-... (by deleted account xyzzy)
by guack
's_size' is not a type
#include <SFML/Graphics.hpp> #include <SFML/System.hpp> #include <SFML/Window.hpp> #include <iostream> class Snake{ int length = 1; fl...
Jan 28, 2022 at 11:19pm
[15 replies] Last: @seeplus @coder777 now it is happening with snek_head.setFillColor(sf:... (by guack)
by pixi
Protecting files on a CD
I am new to C++. I have created a ppt application that uses mp3 sound files and jpg images. Can I use C++ to create something like a container on a CD that wo...
Jan 28, 2022 at 4:27pm
[2 replies] Last: Search for copy cd protection on the internet. There's a couple of way... (by seeplus)
Calculator problem
Write your question here. Why isn't my code going through any other of the if else, it only does if then cuts 0ff and gives me the answer for that [int main(...
Jan 28, 2022 at 3:26pm
[3 replies] Last: PLEASE learn to use code tags, they make reading and commenting on so... (by deleted account xyzzy)
Not compiling properly using G++
I was trying to compile this using my mac terminal g++ -std=c++20 Recursion.cpp and i'm getting the following error Undefined symbols for architectur...
Jan 28, 2022 at 4:12am
[16 replies] Last: I compiled and ran @OP's program using terminal on my macbook without ... (by againtry)
Advice for reading and writing files
I am wondering if it is possible to read in values from a previous text file that has a string (one word) and an integer(example: Lima 77) on each line, and the...
Jan 28, 2022 at 3:03am
[5 replies] Last: Some pedantic-ness: I always write floating point literals with digit... (by TheIdeasMan)
January 2022 Pages: 123... 6
  Archived months: [dec2021] [feb2022]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.