
please wait
by medosz
Class member function
|
I have no idea how to write the statement for the displayAccount member function. I have tried everything. I would be grateful if someone could correct it for m... |
Apr 5, 2019 at 1:31pm
[1 reply] : void displayAccount (){ std::cout << "\naccount1 name:" << ... (by Repeater)
|
by TJW
Linear search doesn't work
|
I tried to compare the comparison times between the linear and binary search. However, the linear search didn't locate the value at all, and kept asking the use... |
Apr 5, 2019 at 12:54pm
[3 replies] Last: Oh, yes you're correct, I missed that part of it while reading that. O... (by Ganado)
|
by gigis74
Big number arithmetic
|
I've been looking on this code a lot and I even rewrote it and I still can't find what's wrong.It has to print the factorial of an entry n. #include <bi... |
Apr 5, 2019 at 12:30pm
[5 replies] Last: If you want to use big numbers you can create a class BigNumber where... (by dhayden)
|
by kyrresc
Template programming
|
Hello, if we have the following function template<typename T> void mySwap(T& a, T& b) { T temp = a; a = b; b = temp; } What requireme... |
Apr 5, 2019 at 12:19pm
[3 replies] Last: Rule of three/five/zero discusses the operator= https://en.cppreferenc... (by keskiverto)
|
by stoneJax
2d array
|
I am trying to initialize a 2 dimensional bool array to false with a constructor. I have a print function that is to display an '*' for each element of the arra... |
Apr 5, 2019 at 8:58am
[4 replies] Last: Show the definition of the class. We cannot see how you declare the b... (by keskiverto)
|
by psosmol
methods get and set
|
Hello I have four files: AllOnesGA.cpp, GeneticAlgorithm.h, Population.h, Individual.h And I don't know why individual.getFitness() give me -1 and not 2 that is... |
Apr 5, 2019 at 8:42am
[13 replies] Last: Sounds about right. Java tends to pass by reference, by default. C++ b... (by Repeater)
|
Can't figure out why I'm getting this error |
I was given code I was supposed to run for class but I get this error every time. Undefined symbols for architecture x86_64: "Date::Date(int, int, int)", refe... |
Apr 5, 2019 at 7:53am
[1 reply] : You declared a constructor Date(int,int,int) on line 13 in Date.h: ... (by lastchance)
|
by TJW
Selection sort doesn't count correctly
|
I tried to compare the bubble and selection sort, so I set the counters to count the times each sort iterated to find the value. But the results seemed incorrec... |
Apr 5, 2019 at 5:29am
[6 replies] Last: #include <iostream> // return the position of the smallest item at o... (by JLBorges)
|
by Marcos8701
Input file opens but nothing is saved. Help!
|
Hello out there! I am having trouble inputting a text file into my code. The text file I want to use looks like this: A 1 5 B 2 5 C 4 5 D 20... |
Apr 5, 2019 at 5:05am
[3 replies] Last: Thank you both for recognizing one of my problems. I switched my if s... (by Marcos8701)
|
by Deadweight77
Random number calculations Read from/Writing to a file
|
For context here is what I'm supposed to do... Write a program that generates a list of random numbers of type int and output to a file named randoms.txt. Then... |
Apr 5, 2019 at 1:38am
[5 replies] Last: Yea I figured it out thank you for your help! (by Deadweight77)
|
by ccaudle
Making a display menu and asking user to choose one and error check to keep asking until one of the three are chosen
|
Im trying to make it where you choose either 1,2, or 3 and if you don't choose one of those then it will repeat and ask you to try again basically. Im unsure i... |
Apr 4, 2019 at 9:59pm
[1 reply] : Getting and validating user input is an example of a loop where the ex... (by dhayden)
|
by redtopaz
C++ Console Program - Determining highest and lowest score for diving competition.
|
I am currently writing a small program in VS17 for my c++ class. I'm sure you all have heard this 'diving' question multiple times before and are probably annoy... |
Apr 4, 2019 at 9:31pm
[1 reply] : You could make two variables high and low for example and every time ... (by Zivojin)
|
by sunshine4
Correctly identify items of 2D vector for comparison
|
I request the input of a number from the user. My code is supposed to query the info in ContainerQ to find the correct vector row items that is also equal to th... |
Apr 4, 2019 at 9:28pm
[3 replies] Last: Hi...just a fyi...I have cleaned up my file. My query and document fi... (by sunshine4)
|
by redfury
Set Precision command when converting float value into string
|
Ok, I am trying to make a string of values inputted by users. Since the values might include decimal values, so I am forced to use float variables. however,... |
Apr 4, 2019 at 7:28pm
[1 reply] : to_string() does not have any way to set precision. For a float or a d... (by AbstractionAnon)
|
by DdavidDLT
Erasing array element
|
I need help. Could yall explain what's happening in the code where I left question marks in the comment place ? This is my first time erasing elements. Done thi... |
Apr 4, 2019 at 6:44pm
[3 replies] Last: you can do it, but you probably have a bug. I don't see it. print th... (by jonnin)
|
by psosmol
no overwriting object
|
Hello I have four files: AllOnesGA.cpp, GeneticAlgorithm.h, Population.h, Individual.h And I don't know why individual.getFitness() give me -1 and not 2 that i... |
Apr 4, 2019 at 4:50pm
[1 reply] : Duplicated post: http://www.cplusplus.com/forum/beginner/251854/ (by Enoizat)
|
by DdavidDLT
Reversing an array
|
EDIT : I managed to find if the array is symmetrical. However, I'd like to have one text to output if the whole array is symmetrical not numbers. An example I h... |
Apr 4, 2019 at 3:35pm
[10 replies] Last: #include <iostream> #include <vector> #include <algorithm> #include <... (by lastchance)
|
by Sukiida
Problems with Dialog windows!!
|
So what im trying to do is make a dialog window that opens more dialogs by using buttons, the main window is fully operable and all, but the windows that i open... |
Apr 4, 2019 at 2:48pm
[no replies]
|
by medosz
Constructor + member function
|
I am trying to write a program with 5 data members constructor initalize the first 3 data members. A displayCarDetails member function should display all the da... |
Apr 4, 2019 at 2:10pm
[1 reply] : The problem is that this code does not compile, for many many reasons.... (by Repeater)
|
by FreeThinker
Small Problem with a getline statement
|
I seem to be having a problem on a snippet of code in my program. In this portion of the program I am looking to display the numbers of vowels from an entere... |
Apr 4, 2019 at 1:28pm
[3 replies] Last: I think you'll find this works: #include <iostream> #include <strin... (by Cheddar99)
|