Beginners - July 2020 (Page 3)

Reference variables not working
 
I have an issue, my teacher assigned me to use reference variables, but the program doesn't work ( i...
[7 replies] Last: Well said @nikovch. I think there were more than 3 suggestions actual... (by againtry)
Array
 
Make only one change to the program below so that the current output changes to the desired output. ...
[5 replies] Last: No, weekDays is an individual character. But I guess you got your an... (by Ganado)
by bld
Why do you have to download Java, but not C++
 
I'm trying to understand how programming languages work. I still don't get why do you need to downlo...
[10 replies] Last: but I don't have to download the language itself, right? As I have ... (by TheToaster)
Is it possible to create a getter for a private array?
 
I currently have a private bool array, in class A that I would like to use in class B. Class B has a...
[9 replies] Last: #include <iostream> class A { private: bool links {false, true, ... (by againtry)
by totoo
trouble using cout within recursive iter
 
hello, im probably overthinking this, but im having trouble printing out the count of comparison th...
[1 reply] : You must initialize count to zero. Then have both functions return th... (by dhayden)
returning an array from a function?
 
I have an exercise that seems to be worded poorly, would like some opinions: "Write a function th...
[2 replies] Last: The sad thing here is that the assignment is teaching you to be a bad ... (by dhayden)
binary tree questions (1,2)
 
Hello everyone - have a question about traversing a binary tree to insert a node correctly. Struggli...
[22 replies] Last: Yeah it’s too long to post all in one ☹️ (by jamesfarrow)
printing ansi art in windows cmd?
 
Hello, do any one know how to print out ansi art in cmd with the help of c++? I have learned that c...
[2 replies] Last: https://docs.microsoft.com/en-us/windows/console/console-virtual-termi... (by jonnin)
Where have I specified a return type for a constructor?
 
Hello, I have 2 classes, one parent and a derived one. I receive the error where i get the follo...
[3 replies] Last: Hello Shishykish, It is the little things that cause the biggest prob... (by Handy Andy)
Functions: Prime number
 
How do I print the following output? Q: tests all the numbers from 2 to 10 (inclusive) and prints...
[1 reply] : I would probably approach it like this int n = 20 for (int i = 2; i... (by Shishykish)
stop reading input with cin when reach a delimiter
 
Hello, Is their a function for cin to stop reading input when reaching a delimiter. I have to read...
[7 replies] Last: Ah i see, okay thanks. (by noahpereira20)
(int i = 0; i < strlen(char*); i++) throwing warning?
 
I'm getting a Visual Studio Warning for the following statement m_plate std::cin >> m_pl...
[2 replies] Last: perfect thanks. (by noahpereira20)
do while doesnt work like expected
 
Hello, i have 2 input-types int. They have to be bigger than the ones before. Start values is 0 and ...
[4 replies] Last: #include <iostream> #include <algorithm> struct Pair { // or just us... (by Ganado)
Private & public function problem
 
Hello I'm learning cpp and I'm currently fiddeling with private and public functions. I think I have...
[2 replies] Last: @Repeater, Ah my fault I forgot. Now I understand. I'm learning. Thank... (by blackshore)
by totoo
memory leak + copy constructor & assignment for Queue
 
I ran valgrind on my homework, and there's a memory leak somewhere. I think it's in my constructor. ...
[3 replies] Last: If you don't want to bother with std::, just declare using namespace ... (by mbozzi)
by totoo
random number inside vector
 
hello how do i insert randomized elements inside a vector without repeating elements? i came about ...
[6 replies] Last: totoo, please also read this thread: http://www.cplusplus.com/forum/be... (by Ganado)
Disappearing struct in pointer
 
I am fairly new to C++ and have been coding Java for over 4 years. The memory management of C++ is n...
[9 replies] Last: Sorry, I had more than Object2 that needed to be allocated with new. (by johnglen244)
Move Zero's Problem - Understanding syntax choices and logic
 
Hi all, I found a working and efficient solution to a problem but without an explanation, and I'm tr...
[3 replies] Last: An efficient solution to this problem is provided in the standard libr... (by mbozzi)
by SO AP
Whats the difference between using "?" and if statements
 
So as per the title i'm having time trying to find the difference between using "?" and if statement...
[3 replies] Last: A ternary expression is generally more difficult to read than the equi... (by helios)
Help with exercise
 
Hello, I am working on some exercises in c++,and i am stuck on this one. Could someone help me? The...
[5 replies] Last: #include <iostream> using namespace std; bool exists(int , int, int... (by Manga)
July 2020 Pages: 12345... 12
  Archived months: [jun2020] [aug2020]

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