Beginners - March 2019 (Page 2)

include
 
Hello, I have four files: AllOnesGA.cpp, GeneticAlgorithm.h, Individual.h, Population.h My idea is...
[2 replies] Last: It depends entirely on what the dependencies are. Any file (be it .cp... (by salem c)
Directions
 
In the code given below, Line # 91 stores a value to the east of i=0 and j=0. using [k + 1] as in...
[3 replies] Last: 1. Add some convenience variables. 2. Rename some of the cryptic 1 and... (by salem c)
timer function - how to improve?
 
I don't feel so comfortable using the following code I wrote. How can I make it better? #inclu...
[3 replies] Last: Your program loops as long as 'interval' endures through your while lo... (by nuderobmonkey)
Plz help
 
so here's my problem. despite making the class "PointerC" public, I cant use it anywhere else. basic...
[7 replies] Last: > If Int is calling a variable, then PointerC is like int. We say 'int... (by salem c)
Create 3 functions that print initials using asterisk.
 
I'm writing a program that is supposed to print out the 3 letters of my initials using asterisks. M...
[4 replies] Last: Thanks again AbstractionAnon. I was a little tired and out of it earl... (by BIGB185)
Attempting to create a 2D dynamic array for unknown values
 
I have a file that I need to read. The file should be read such that once the code reads a number al...
[6 replies] Last: Thanks all...tried all. lastchance's and dutch's worked as listed. The... (by sunshine4)
Program returning "inf" instead of calculated value
 
I am new to C++ and in order to practice, I tried writing a program on an online compiler to calcula...
[4 replies] Last: Thank you so much everyone for the advice! My code is now working corr... (by haro227)
Smart way of finding a number with changing the range
 
Hello, could you help me in adding additional logic when the find number function randomly pick a...
[1 reply] : the smart way is to not pick randomly, but to cut it in half every tim... (by jonnin)
by Alb13G
exponent function Without POW or Multiplication (1,2)
 
this seems challenging Write a function that accepts two input parameters and computes the result of...
[21 replies] Last: I was saying you can use the * function you wrote, using adds... as f... (by jonnin)
by ICantC
Parse question
 
I'm trying to parse a text file which will have many lines similar to this: 2019-03-25 08:43:12,628...
[8 replies] Last: edit: it also stops reading the line once a character is hit rather th... (by jonnin)
Beginners Hangman quick
 
Use IF, loops, switch, and string statements to create a basic hangman program. You will have to: 1....
[4 replies] Last: // basic hangman program #include <iostream> #include <string> using ... (by MikeStgt)
Pass by value
 
Hello, I had a question regarding passing parameters by value into a function, and what exactly h...
[3 replies] Last: Yes. b goes out of scope when the test function ends. (by Peter87)
Help with editing/correcting code
 
Hi all, I've completed a basic assignment for a class of mine. This is a assignment where you nee...
[1 reply] : > *this = Complect (name, computername, monitorname, price); All these... (by salem c)
by Bopaki
Program compiles OK but bombs out when running it
 
The skeleton of the program in from the bo0k by DS Malik. Three functions were not defined there an...
[2 replies] Last: Thank you very much lastchance!!!! It worked very well after changing ... (by Bopaki)
Why am I getting garbage values
 
The program out puts almost correctly, but does not give me the grade,instead gives me garbage value...
[9 replies] Last: Thank you ! (by ames1951)
by daveed
Anyone know why my find method is returning false all the time?
 
When I try to get true by inputting the correct isbn, it still returns false. Any Ideas? boo...
[1 reply] : Use a debugger, or add some debug printing of your own. for (int... (by salem c)
by daveed
Why is my list method only printing the last book
 
I am building a list method to print out all the books in the warehouse. Which in theory should prin...
[1 reply] : > istream& operator >> (istream& is, Book& book){ This reads the WHOLE... (by salem c)
by gifm
Loop with Nested If Problem
 
Hello, I am trying to do a program that involves loops and a nested if. The user needs to input a ho...
[2 replies] Last: Thank you. (by gifm)
Overloading Functions
 
I'm learning about overloading functions. The program must multiply an integer, double and a combina...
[2 replies] Last: I think it's asking to display the product of the integer and double m... (by simulationspecimen)
PR Numbers
 
Problem link : https://www.hackerearth.com/challenges/competitive/march-circuits-19/algorithm/pr-num...
[6 replies] Last: so, my given numbers are right in between 1 and 100 ? (by cool123dude)
March 2019 Pages: 1234... 25
  Archived months: [feb2019] [apr2019]

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