Beginners - July 2021 (Page 4)

Doubts in Class & function
I am new to C++, only know some simple c++ basics. While studying some codes in c++ related to class...
[16 replies] Last: The example by seeplus did just that. Here is another: std::vector<i... (by keskiverto)
by vboro
Memory game pair generating?
Hi! I would like to make a simple cmd console memory game. I have the idea how to do the logical ...
[8 replies] Last: Thanks everyone for the answers, I got the solution :D And @whitenite1... (by vboro)
Dice roll function
Does anyone have an experience playing Senet? It's an eqyptian game that I have been tasked with wri...
[4 replies] Last: how would I go about writing a "dice roll" function for a 5 sided dic... (by George P)
Thread (sleep) one second then calls the method to update it by a second
I have a 12 hour clock and a 24 hour clock. I need to have a thread that sleeps one second then call...
[5 replies] Last: That's not how it would usually be coded. Use mod and int division T... (by zapshe)
Help with program
I'm trying to get this program to only ask if the user would like another question after the 5th cor...
[3 replies] Last: #include <iostream> #include <cstdlib> #include <ctime> int generat... (by seeplus)
When to line break when printing a one dimensional array as a multidimensional one?
Let's say I have an array char arr but I want to print it linearly, breaking lines when appropria...
[7 replies] Last: Look at the size of the declared char array, a maximum of 64 character... (by George P)
by MrASR
How to fetch text between 2 texts or end of text with regex ?
How to fetch text between 2 texts or end of text with std::regex ? #include <regex> #include...
[1 reply] : Something like: std::regex rgx("liripsum +(\\w+)(?: +sapsum|$)"... (by dutch)
Heap Priority Queue for to-do list (1,2)
For this assignment I have to implement a class called HeapPriorityQueue. I have to create a Driver ...
[30 replies] Last: Got to to run. Thanks for your help @seeplus I really appreciate it. (by Lacy9265)
Online C++ Simulator
Hi, I am looking for a good online C++ simulator. Need suggestions. Thanks.
[5 replies] Last: looks fine. No. It only supports upto C++14 - nor the lates... (by seeplus)
by MrASR
How to use substr but use variable in c++
I want to fetch code between "is " & " ok" text using substr from string str #include <iostr...
[3 replies] Last: You should start the search for ok after the position of is in case ok... (by seeplus)
lower bound
I am doing hackerrank questions and one requires the use of lower_bound, so i read it on the cpp.ref...
[2 replies] Last: Look at what std::vector::end() means: It is PAST the last element ... (by George P)
I cannot move onto the next line in the file
I have this code where I cannot move onto the next line I keep feeding my variables the same stuff e...
[2 replies] Last: Every time you go to read data into your properties variable, you're o... (by zapshe)
Setting true or false by user
So im trying to do something, ask questions and then find out a character, if i have a bool, lets na...
[2 replies] Last: If you want the user to type "true" or "false" you can use the I/O man... (by mbozzi)
How will i add this in?
Hi, im brand new to coding, some context. i found a tutorial on youtube on how to code a game and i ...
[3 replies] Last: > Any fix to that? Yeah, it's something you need to write. It's li... (by salem c)
printing a linked list
Hello, I am learning linked list, and have come across something that I am having issues with. It is...
[1 reply] : the second loop will dereference a null pointer if the list is empty, ... (by jonnin)
hi, i need help with my coding because the calculation of the cgpa doesnt appear :(
my calculation of cgpa doesnt appear. please help. #include <iostream> #include <sstream> ...
[2 replies] Last: For a slightly different take on this using an array for the subject n... (by seeplus)
Stop after catch in C++
Hello, After catch show function from t4 executed. I'd like to stop the program after the catch. I...
[4 replies] Last: The use of exit() here isn't the best as that's an unexpected side-e... (by kbw)
Need help
Question is : Consider the class declaration and main() function below. There are two errors in the ...
[7 replies] Last: There are two errors in the main() function. Name the errors and expl... (by keskiverto)
Want help , been struggling with this :(
A college offers diploma course with five set modules each. Define a class Student as an ADT that u...
[3 replies] Last: please bare with me Hold yer horses, buddy! This is not that kind of... (by dutch)
Overloading + , - and * operators (long)
Question we got was : Define a class Pairs with two integer data members, f and s, where f represent...
[2 replies] Last: The operator = * - don't need to be friend functions. They can be just... (by seeplus)
July 2021 Pages: 1234567
  Archived months: [jun2021] [aug2021]

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