
please wait
loops: countdown until matching digits |
Goal: Write a program that takes in an integer in the range 11-100 as input. The output is a countdown starting from the integer, and stopping when both output... |
Mar 8, 2022 at 2:37am
[3 replies] Last: thanks @thmm !! I think that was one of my main issues!! ---- Here's t... (by seaminusminus)
|
by bydrachen
Help with simple calculator (if - else)
|
The teacher wanted us to make a simple calculator. But he wants it as short as possible. Can I go shorter than these? Input: 3+5 Output: 3+5=8 is a must. ... |
Mar 8, 2022 at 12:58am
[8 replies] Last: good luck! I was trying to say that originally ... too short usually ... (by jonnin)
|
by Dantrew
Understand while loop and storing arrays.
|
Hi! First of all I'm new to programming, yeah thats why it's the beginners forum, and try to sort things out. I have taken a distance course so much of the help... |
Mar 7, 2022 at 7:37pm
[5 replies] Last: Instead of having a bunch of if/else statements a switch reduces the n... (by deleted account xyzzy)
|
by DarkStar88
Inheritance, calling a children method from parent
|
Hello, I am new to the forums as recently started learning C++, and I am trying to wrap my head around C++ from a C# developer perspective. I am making a gam... |
Mar 7, 2022 at 4:46pm
[8 replies] Last: depending on what you are doing, static (keyword) class variables alwa... (by jonnin)
|
how to delete a specific line from a txt file |
I've stored data in a text file, but I've got a requirement if the input, say a is seen in the file already( I know how to do that), delete the line, how would ... |
Mar 6, 2022 at 10:29pm
[4 replies] Last: I've stored data in a text file, but I've got a requirement if the ... (by dhayden)
|
by roaring90s
Saving structs to files
|
I have this struct and I wish to add info about an undefined no. of albums (meaning I couldn't have an int n where it'd just stop reading). This information wou... |
Mar 6, 2022 at 9:17pm
[5 replies] Last: If you go with binary, I prefer the fixed size if you can nail down a ... (by jonnin)
|
by Spyrex
Own CMAKE library
|
Hey, I am relatively new to cpp. I programmed some classes I want to be able to build to a separate library I can use from another cpp project. This my dire... |
Mar 6, 2022 at 12:15pm
[no replies]
|
by ColeMilla
New to file input/output, dont know where im going wrong.
|
Doing an assignment that merges two text files and i cant figure out why no text is being outputted to my merge file. Please give me a hint/pointer to what im d... |
Mar 5, 2022 at 10:59pm
[3 replies] Last: It's easier to write the merge in two loops. The first for when neithe... (by DizzyDon)
|
by SubZeroWins
initializing static variable
|
I was first introduced to keyword static when going over singleton classes and then saw it again when trying to prevent a class from instantiating on the stack.... |
Mar 5, 2022 at 8:21am
[1 reply] : The reason is that variables are normally only allowed be defined once... (by Peter87)
|
by whiteW0lf
Random Number Generator
|
I have this function to generate a random number seeded at the time of the computer, and I use this function several times with the same parameters. However, si... |
Mar 5, 2022 at 2:11am
[7 replies] Last: @ anup30 Do you like going backwards? It really helps to read the thr... (by Duthomhas)
|
by LeslieS
[solved]Calling a copy constructor using 'this'
|
I have my copy constructor defined like so: CardStack::CardStack(const CardStack &pCS) { foreach(Card c, pCS){ this->append(c); } } ... |
Mar 5, 2022 at 1:20am
[5 replies] Last: If you are talking about the tutorial here at CPlusPlus, yeah, it ain'... (by deleted account xyzzy)
|
by Ganado
watching
|
Answered in other thread: http://cplusplus.com/forum/beginner/282490/ [Well, I don't agree with whoever decided to be the judge, jury, and executioner here (un... |
Mar 4, 2022 at 3:27pm
[1 reply] : Answered, and the OP was ejected by a large boot. (by deleted account xyzzy)
|
by Ganado
beginner tpoic?
|
What are the errors? Copy and paste them for us next time. Your binaryK function returns a vector<int>, but you never use this. If you need to treat a vector a... |
Mar 4, 2022 at 2:52pm
[8 replies] Last: It doesn't matter now, someone gave the OP "The Boot..." [quote=jonni... (by deleted account xyzzy)
|
by Bazi
C++ coin game using inheritance
|
Code instructions: The Coin class will act as the base class. Three child classes will be created using the Coin class as the base class. The classes will be ... |
Mar 4, 2022 at 1:22pm
[4 replies] Last: #include <iostream> #include <string> #include <ctime> class Coin { ... (by againtry)
|
by eyeymin
HELP ME WITH THIS PROBLEM! (CHEMISTRY CONVERSION)
|
Zinc (Zn) is a silvery metal that is used in making brass (with copper) and in plating iron to prevent comosion How many moles of Zn are there in 23.3 g of Zn?... |
Mar 4, 2022 at 9:45am
[2 replies] Last: Well as a starter for part 1): #include <iostream> int main() { st... (by seeplus)
|
by daddymomo
Do while loop
|
I'm trying to make a program using do..while loop that asks user for two inputs. Then print from 1 to the first number the user entered or until the first multi... |
Mar 4, 2022 at 9:20am
[4 replies] Last: Alright man, that works perfectly. Thank you for the help, appreciate ... (by daddymomo)
|
I solved SoloLearn Problem on VS code and when i entered code on their platform it didnt work. |
So i was solving this SoloLearn Ticket office problem with C++. here is problem: "~You are working on a ticketing system. A ticket costs $10. The office is ... |
Mar 4, 2022 at 7:14am
[6 replies] Last: [quote=seeplus]the start min is the more than any valid min. The inpu... (by keskiverto)
|
by dorito200
Overloading the Addition operator to add 2 arrays of numbers
|
So for a task for school, I have to create a type class that can handle large ints stored as a dynamic array of shorts. I have hit a snag on the addition operat... |
Mar 3, 2022 at 7:23pm
[3 replies] Last: That constructor takes one argument, so it can't be the same construct... (by lastchance)
|
by Kaiser89
Need help debugging a project on C++
|
Code: https://github.com/Kaiser808/cpp Assignment: https://filebin.net/d7wkeca4r1ydbsxx I need help debugging these files. I got help from someone on Cheg... |
Mar 3, 2022 at 6:15pm
[13 replies] Last: Thanks a lot for the help @salem c (by Kaiser89)
|
by Ganado
Passing arithmetic function objects into map
|
There was this question here, asking about how to make a particular piece of code shorter: http://cplusplus.com/forum/beginner/282476/ Just for fun, I was tryi... |
Mar 3, 2022 at 3:58pm
[2 replies] Last: Yep, that works. Thank you. Apparently lambdas work, too: http://www.... (by Ganado)
|