Beginners - February 2016 (Page 2)

Class Templates
 
Hey guys, wrote this program with class templates to get the area of a rectangle. I placed it in a l...
[1 reply] : You should place a break; after the cout on line 71. Apart from tha... (by coder777)
Object method error says non-const must be an lvalue.
 
Hi so I'm receiving an error that I have not yet encountered that says " Initial value of reference ...
[1 reply] : The class function Stack::push takes the following parameters: (List<... (by Moschops)
Program to calculate interest isn't working.
 
This program is designed to calculate interest but it gives me the initial investment three times in...
[6 replies] Last: I'd suggest using just one function and pass the number of days as a p... (by Chervil)
Function and struture
 
Hi guys, I need to write a c++ program which i will mention below. I have only manage to start on th...
[no replies]
questions regarding arrays and structure
 
i have some question regarding arrays and structure. Q. a condominium has 3 BBQ pits available fo...
[no replies]
Please tell difference between copy constructor
 
What is the difference between copy constructor and default copy constructor. and class dis{ ...
[1 reply] : What is the difference between copy constructor and default copy cons... (by TheIdeasMan)
calling a function from one class to another
 
I am trying to make the game tic tac toe. I am suppose to have two classes one called board where th...
[4 replies] Last: I think you misunderstand. In the main function, you create an objec... (by sasauke)
How would I get the length of the last word in a string of input?
 
Write your question here. I know how to get the length of one word or the length of all words in a ...
[1 reply] : Try world.length (by papagym177)
by sya20
how to use 2D array, 'if' statement and 'for' loop
 
I have no idea on how to make a 3x3 and 4x4 2D array and also using the 'if' statement. I also need ...
[5 replies] Last: It almost seems as simple as adding braces ('{}') around your code... ... (by WakeofMisery)
morse code translator PLEASE HELP
 
This is for an assignment and I can't use c++ strings... Only c-style strings. Any help on solving t...
[1 reply] : Use the thingie on the bottom right so it isnt a pain in the eye pls... (by MaBunny)
How to print with two figures to the right of the decimal.
 
Hey all. Got a program to run fine, but I'm having to print it in dollars and cents. However, obviou...
[3 replies] Last: #include <iostream> #include <iomanip> double get_interest( double a... (by JLBorges)
Problems with my calculator
 
I keep getting errors in the following code (I will be posting the errors at the bottom of the code)...
[3 replies] Last: Both n1 n n2 are int types try using this : cout<<(float)(n1/n2)<<e... (by MaBunny)
number of divisors
 
Since I am terrible at summarizing here is what I need to do "Write a function - maxDivs() - that ...
[1 reply] : #include <iostream> // returns the number of integral divisors of nu... (by JLBorges)
Help Scanning document
 
For an assignment I have to create a program that reads two files. One (Student data file) containin...
[no replies]
can't get 3 lowest values to print correctly
 
I can't get my randomly generated multidimensional array to print out the 3 lowest numbers correctly...
[5 replies] Last: nevermind guys I got it!! thanks again (by misslyss)
cout behaviour
 
I'm opening a file and reading through it line by line, printing each line to the console. If I do n...
[7 replies] Last: If you use a text file created on a windows system and try to use it... (by RadWayne)
Loop help
 
So I'm given 2 tsv files StudentData.tsv and ClassData.tsv. In StudentData.tsv, it displays what cla...
[3 replies] Last: So are you able to use functions? My suggestion would be to read the ... (by Chervil)
Conversion table
 
Dear all, I tried to get the program below running but I could not. I think slash is creating p...
[1 reply] : Line 6, that '/' is not a legal character for creating variables. You ... (by newbiee999)
opening/reading from a file
 
Hey guys, I cant get this file to open and Im not sure why. Any help would be appreciated string...
[1 reply] : change lines 4 and 5 to these: ifstream myfile; myfile.open("preside... (by newbiee999)
February 2016 Pages: 1234... 46
  Archived months: [jan2016] [mar2016]

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