
please wait
by nikovch
Reference variables not working
|
I have an issue, my teacher assigned me to use reference variables, but the program doesn't work ( its about sorting 3 strings entered by user ), and I tried re... |
Jul 26, 2020 at 10:20pm
[7 replies] Last: Well said @nikovch. I think there were more than 3 suggestions actual... (by againtry)
|
by cuny student
Array
|
Make only one change to the program below so that the current output changes to the desired output. Desired output: Monday onday nday day ay y #include <i... |
Jul 26, 2020 at 2:23am
[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 download certain languages, like Java, Python, Go etc. But this do... |
Jul 25, 2020 at 11:26pm
[10 replies] Last: but I don't have to download the language itself, right? As I have ... (by TheToaster)
|
by jkwok678
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 access to has a list of class A, and for each object of Type ... |
Jul 25, 2020 at 12:54pm
[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 that happens in quick_sort and merge_sort as well as properly ... |
Jul 25, 2020 at 12:43pm
[1 reply] : You must initialize count to zero. Then have both functions return th... (by dhayden)
|
by JamesHelp
returning an array from a function?
|
I have an exercise that seems to be worded poorly, would like some opinions: "Write a function that finds the first occurrence of a value in a two-dimensiona... |
Jul 25, 2020 at 12:37pm
[2 replies] Last: The sad thing here is that the assignment is teaching you to be a bad ... (by dhayden)
|
by jamesfarrow
binary tree questions (1,2)
|
Hello everyone - have a question about traversing a binary tree to insert a node correctly. Struggling at the mo :( This is what Have so far #ifndef ... |
Jul 25, 2020 at 5:17am
[22 replies] Last: Yeah it’s too long to post all in one ☹️ (by jamesfarrow)
|
by blackshore
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 cleaning screen is system ("CLS"); If you copy the cod... |
Jul 24, 2020 at 6:46pm
[2 replies] Last: https://docs.microsoft.com/en-us/windows/console/console-virtual-termi... (by jonnin)
|
by Shishykish
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 following " return type may not be specified on a construct... |
Jul 24, 2020 at 4:50pm
[3 replies] Last: Hello Shishykish, It is the little things that cause the biggest prob... (by Handy Andy)
|
by cuny student
Functions: Prime number
|
How do I print the following output? Q: tests all the numbers from 2 to 10 (inclusive) and prints out the results, each on a separate line. (Hint: Use a for... |
Jul 23, 2020 at 10:14pm
[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 a line with multiple fields. (int), (8 character max ch... |
Jul 23, 2020 at 8:29pm
[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_plate; for (int i = 0; i < strlen(m_plate); i++){ ..... |
Jul 23, 2020 at 7:57pm
[2 replies] Last: perfect thanks. (by noahpereira20)
|
by ErnstPeter
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 -1; Allowed Values: { 31,32,41,42,43,51,52,53,54,61,62,63,6... |
Jul 23, 2020 at 7:46pm
[4 replies] Last: #include <iostream> #include <algorithm> struct Pair { // or just us... (by Ganado)
|
by blackshore
Private & public function problem
|
Hello I'm learning cpp and I'm currently fiddeling with private and public functions. I think I have missed something in my code. Thanks for any advice ERROR ... |
Jul 23, 2020 at 8:48am
[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. Also, how would I start with copy constructor and assignm... |
Jul 23, 2020 at 3:05am
[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 this article that I thought would help me but i think I'm im... |
Jul 23, 2020 at 1:38am
[6 replies] Last: totoo, please also read this thread: http://www.cplusplus.com/forum/be... (by Ganado)
|
by johnglen244
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 new to me and I want to make sure I understand it correctly. ... |
Jul 23, 2020 at 12:59am
[9 replies] Last: Sorry, I had more than Object2 that needed to be allocated with new. (by johnglen244)
|
by beulette
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 trying to make sense of it. I understand the problem, but I'm ... |
Jul 22, 2020 at 10:59pm
[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 statements. Is one considered proper format or does one have potentia... |
Jul 22, 2020 at 9:38pm
[3 replies] Last: A ternary expression is generally more difficult to read than the equi... (by helios)
|
by jovulena
Help with exercise
|
Hello, I am working on some exercises in c++,and i am stuck on this one. Could someone help me? Thenk you The aim of this exercise is to check the presence ... |
Jul 22, 2020 at 8:53pm
[5 replies] Last: #include <iostream> using namespace std; bool exists(int , int, int... (by Manga)
|