[try Beta version]
Not logged in

Beginners - April 2019 (Page 21)

by medosz
Class member function
 
I have no idea how to write the statement for the displayAccount member function. I have tried every...
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 se...
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)
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 ha...
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)
Template programming
 
Hello, if we have the following function template<typename T> void mySwap(T& a, T& b) {...
Apr 5, 2019 at 12:19pm
[3 replies] Last: Rule of three/five/zero discusses the operator= https://en.cppreferenc... (by keskiverto)
2d array
 
I am trying to initialize a 2 dimensional bool array to false with a constructor. I have a print fun...
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)
methods get and set
 
Hello I have four files: AllOnesGA.cpp, GeneticAlgorithm.h, Population.h, Individual.h And I don't k...
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 ...
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...
Apr 5, 2019 at 5:29am
[6 replies] Last: #include <iostream> // return the position of the smallest item at o... (by JLBorges)
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...
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)
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 numb...
Apr 5, 2019 at 1:38am
[5 replies] Last: Yea I figured it out thank you for your help! (by Deadweight77)
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 ...
Apr 4, 2019 at 9:59pm
[1 reply] : Getting and validating user input is an example of a loop where the ex... (by dhayden)
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 'd...
Apr 4, 2019 at 9:31pm
[1 reply] : You could make two variables high and low for example and every time ... (by Zivojin)
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 t...
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)
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 decim...
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)
Erasing array element
 
I need help. Could yall explain what's happening in the code where I left question marks in the comm...
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)
no overwriting object
 
Hello I have four files: AllOnesGA.cpp, GeneticAlgorithm.h, Population.h, Individual.h And I don't ...
Apr 4, 2019 at 4:50pm
[1 reply] : Duplicated post: http://www.cplusplus.com/forum/beginner/251854/ (by Enoizat)
Reversing an array
 
EDIT : I managed to find if the array is symmetrical. However, I'd like to have one text to output i...
Apr 4, 2019 at 3:35pm
[10 replies] Last: #include <iostream> #include <vector> #include <algorithm> #include <... (by lastchance)
Problems with Dialog windows!!
 
So what im trying to do is make a dialog window that opens more dialogs by using buttons, the main w...
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...
Apr 4, 2019 at 2:10pm
[1 reply] : The problem is that this code does not compile, for many many reasons.... (by Repeater)
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 ...
Apr 4, 2019 at 1:28pm
[3 replies] Last: I think you'll find this works: #include <iostream> #include <strin... (by Cheddar99)
April 2019 Pages: 1... 192021222324
  Archived months: [mar2019] [may2019]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.