Beginners (Page 24)

What is the best way to manipulate objects within other objects?
Hello, I have an object of class BankAccount which has an object of class Person, which has an objec...
[2 replies] Last: The name and birth date of a person never change, once you created it.... (by jonnin)
by Tru
cmake command for "additional dependencies"
Hello all. When I use cmake with VS 2019 there is no project properties menu to set the additiona...
[no replies]
help having input and output displayed on same line
Write your question here. Hello, I am working on a hw assignment where I need to convert a phone nu...
[4 replies] Last: that does look like a lot, and more advanced than the point we are at ... (by theghost)
by obeeey
How to print this pattern?
Hi, my aim is to print this pattern: o---- -o--- --o-- ---o- ----o where n=5 is a side le...
[2 replies] Last: Wow, thank you so much, you really saved my evening. I completely forg... (by obeeey)
Outputting Sorted Data and Reset GPA
I'm currently writing a program where it'll display the student records in 4 columns(ID, first name,...
[6 replies] Last: I still recommend doing it first without pointers and then, if really ... (by lastchance)
Overloading the () Operator?
I'd like an instance of my struct to be created as such: Timer() as opposed to Timer f...
[3 replies] Last: It's probably worth mentioning: The rule in C++ is that if something ... (by Ganado)
Strange Number Output in std::cout
I'm trying to print array elements to the console via std::cout. Most of the numbers output normal...
[4 replies] Last: You can change the precision and format of std::cout Great, thanks.... (by calioranged)
How do I make my selection statement not run in the loop after I put my sentinel to quit on my age input
//Finding smallest number in a series of user input of numbers #include <iostream> #include <cmath...
[1 reply] : After getting the value ( cin>> age ) you need to check to see if it i... (by Duthomhas)
Hackerrank array input method
Hello everyone. Can u plz ecplain or post a link where I can understand the method used by Hackerra...
[1 reply] : What method? I would have guessed that any valid code which actually ... (by salem c)
If/else run-time error
Hello, I'm having trouble with my code. It compiles fine, but one of my if conditions isn't being re...
[3 replies] Last: It works now! Thanks for the help. Also had to add cin.ignore() since ... (by commitzero)
by AL88
overloading ostream issue
Hi I got this of a youtube video but I can't get it to compile, can anybody tell me what is wrong an...
[4 replies] Last: Thanks for your invaluable help, got it to compile :-) (by AL88)
Incorrect Output
I am doing an assignment for a class in which the user must input a grade for their last test and th...
[4 replies] Last: It worked! I am still a beginner at C++ so thank you for the help! (by ajent047)
Minesweeper game problem
Hello all.I am trying to write a console Minesweeper game.But my program crashes from one function t...
[7 replies] Last: Yes thank you very much.I get it now.Because I do not check if that ti... (by Zivojin)
Capitalize first two letters of a given string
I am making a code that needs a way to capitalize the first two letters of a given string. Example: ...
[3 replies] Last: Each condition in an if statement must be independent, you need a con... (by Yuripetrocchi)
Sorting with random numbers
Using the rand () function, fill 5 arrays of integers with the same 10 random numbers. These numbers...
[9 replies] Last: ... it defines a timer, put it right above main and use it in main as ... (by jonnin)
basic help -function and structs.
I JUST NEED HELP ON THE WRITING THE FUNCTION PART. write a function called calculatePay( ) which ta...
[8 replies] Last: if (e.hours > MAXREGHOURS) { //... } //if (e.hours <= MAXREGHOURS)... (by ne555)
by Jamec
Can someone explain why my code isnt working?
So im trying to write some code for one of my classes and I cant figure out whats wrong with it, its...
[8 replies] Last: This: array is array notation. (by jlb)
by amgs65
Using do while loop to get the average of ten numbers.
I have an assignment to do in C++. I need to use do while loop to get the average of ten numbers. I'...
[3 replies] Last: It's trivial to convert a for loop to a while loop. The for loop stat... (by MikeyBoy)
Adding rationals with overloading operators
I'm close to getting the code right, but I'm missing something. Anytime I add a rational with the sa...
[3 replies] Last: Line 25 simply overwrites the value from line 24. I guess you want lin... (by coder777)
Accessing Private Variables Within Class
Quick question on private variables. If I want to access a variable from within the class, how does ...
[3 replies] Last: when you call a member function, the object is passed as a hidden argu... (by ne555)
Pages: 1... 2223242526... 29
  Archived months: [sep2019]

Cannot post in this page. To post a new message, go to the first page.