Beginners - September 2021 (Page 7)

Good practice for this two scenario
hello guys! I would like to know your opinion about what is better (or good practice) for these 2 s...
[2 replies] Last: I will even go so far as to say that exit()/terminate() and so on shou... (by jonnin)
Placing Functions inside class vs outside
I see that a function can be coded directly in side a class--or--a model/header can be defined insid...
[6 replies] Last: OK and thank you for all the deliberation. As expected there are "fine... (by fsonnichsen)
looping function
Hi everyone. I'm writing a code which takes 4 files and do statistics stuff with the datas. I really...
[4 replies] Last: Ok, so you can have a struct which represents the data, but you won't ... (by TheIdeasMan)
Hi everyone, I'm fairly new to c++ and I'm working on an assignment that I have managed to work thro...
[10 replies] Last: For the others, consider: #include <algorithm> #include <iterator> ... (by seeplus)
by ppkaa
Access Violation Writing Array Reading .txt
Dear all, I'm a newbie in any programming, and recently must work on c++. I have a difficulty in ...
[3 replies] Last: Dear Jonnin and TheIdeasMan, Thank you for the advise. I will reproce... (by ppkaa)
If/Else coupon problem
I've been having a difficult time completing this code and getting it to run properly. I'm a beginne...
[1 reply] : In function 'int main()': 78:2: error: expected '}' before 'else' 33:... (by TheIdeasMan)
Now both of these codes are logically correct and should give the same answers and in arrays if I di...
[3 replies] Last: In your second loop, during the process you are trying to display the ... (by Geckoo)
Homework fill in blank question to figure out output
Suppose that you have the following C++ Code segment. Show the contents of each variable and the con...
[3 replies] Last: 4) cin of an int is weird. its going to read the whole thing and cons... (by jonnin)
Vector version of pointer pointer array
Are these roughly equivalent? Not sure if the *'s are in the right place for the vector in...
[3 replies] Last: I generally prefer to keep everything 1d as much as possible for a var... (by jonnin)
by LeoV3
How does program know array size? (1,2)
Hello, I'm learning to code in C++ by reading "Programming principles and Practice using c++ (2nd ed...
[24 replies] Last: I really do like using std::array over using a plain array more than ... (by seeplus)
Loops to make 3 tables of Celsius, Fahrenheit and Kelvin
Ive gotten started on this hw homework problem due tonight but I am completely stumped. Prompt: Wr...
[7 replies] Last: @againtry Nevermind I got it to work, thanks for the help! (by gigacapybara)
Convert 12 hours to 24 hours
I am stuck on a homework problem where I have to convert 12 hours to 24 hours. Prompt This program...
[8 replies] Last: #include <iostream> #include <string> #include <iomanip> /* 5:30:00... (by againtry)
binary search tree confusion
Hello, I am learning data structures from youtube - mycodeschool, and most is really easy to follow ...
[5 replies] Last: yea this looks like older code, C++ converted over from C. Maybe on p... (by jonnin)
how can i prent the array after evry pass in bubble sort
My sort works. unfortunately I don't seem to be able to print the array after evry passes, do I ne...
[8 replies] Last: Or even as C++20: #include <algorithm> #include <iostream> #include... (by seeplus)
by alexas
rotation of the cuboid chain (1,2)
I asked this question long time before with no success but it was even more complicated situation. I...
[37 replies] Last: Just simple Thanks just does not sound seriously, I was totally lost i... (by alexas)
Why does my code on C++ skip the getline on line 30?
Why does my code on C++ skip the getline on line 30? #include <iostream> //For the common code...
[3 replies] Last: Hello Silver29, If you are still interested and catch this. Some sugg... (by Handy Andy)
by derpus
How do I check what specific char has been outputted to a specific xy position in the console?
How do I check what specific char has been outputted to a specific xy position in the console? I ...
[9 replies] Last: The Windows console is based upon a resizeable 2-d buffer and a window... (by seeplus)
How to count uppercase and lowercase strings
I managed to finish this homework problem, the only issue is that it did not count instances of a su...
[5 replies] Last: For some versions of some compilers (gcc?? - VS was OK), you had to wr... (by seeplus)
by AkiraC
How to print out sum for every loop?
Hi, I wanted to sum up the marks of one student, then proceed to the next student, however, the sum ...
[6 replies] Last: Hello AkiraC, I finally figured out the problem I was having. In the... (by Handy Andy)
September 2021 Pages: 1... 567
  Archived months: [aug2021] [oct2021]

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