Beginners - March 2013 (Page 57)

by dman12
For Loop Help
 
#include <iostream> #include <iomanip> using namespace std; int main() { system("CLS"); double grade, test, number, average, sum; int counter = 1;...
[1 reply] : take the sum calculation within the for loop. A present it is just add... (by abhishekm71)
Need help with strings and file input?
 
Hi! I have made an access code program where you store access codes into a file via the program. I successfully made the program, but when the data is stored, t...
[7 replies] Last: No problem (by greenleaf800073)
function does not take 3 arguments
 
I'm trying to read text from "input.txt", but when I call the function ("check")i get the error: "function does not take 3 arguments". please, help me. here's "...
[2 replies] Last: Thanks a lot, Chervil. I solved my problem. (by phongmd)
BMR calculator. need revision
 
1. Write a C++ program to calculate Basal Metabolic Rate and total calorie needs. Use the Harris Benedict equation to calculate calorie needs. 2. The program m...
[2 replies] Last: You're a life saver! int selection; cin>> selection; if (selection... (by nickelcarbonate)
I NEED HELP
 
I have a program due soon and this is the prompt: Program 6 Filled Squares Write a program that will require the user to enter an ODD integer between 0 and 2...
[3 replies] Last: Yes, you on the right track. Line 13: You already got number and valid... (by MiiNiPaa)
Help requested with a dynamic array.
 
SO I'm very new to c++ (as in a few weeks) and I've been reading the C++ Primer Plus by Stephen Prata. At the end of each chapter he outlines programming exerc...
[7 replies] Last: Thanks, brutaltomrammen and cire. This should compile cleanly: #incl... (by JLBorges)
by RiHdz1
need help with problem
 
The problem is with "case '10'". When I debug and type in "10", result comes back as "You entered I". How can I fix this? Here is the code: // Roman Numeral ...
[4 replies] Last: But after changing it back to INT AND surrounding my numbers with par... (by Chervil)
AVL tree average depth
 
Hey guys, I have to build avl tree and find its average depth i.e. height/no.of nodes. I could not figure out any other way so i decided to enter manually heig...
[2 replies] Last: thanx for reply. Actually i already have the height same process as yo... (by kalicha)
Trying to call method/array on different .cpp problem
 
Basically, I have multiple .cpp files in one program. One .cpp file contains the command visited.push_back( startSquare ); and i want to use that command i...
[15 replies] Last: I ended up just using the line theTour.getVisited().push_back(Square(... (by Computer Hermit)
expression: (unsigned)(c+1) <= 256
 
So ya, this is my first post, but this is my current source code, the title is my error. Everywhere online I read about this error talks about how char has to b...
[2 replies] Last: At what line do you get this error? (by Peter87)
by Pebble
Conditional operator with comma
 
I ran the following program and if value = 0 both of the decrement's on the right of the comma are executed, But if value = 1 only the first increment on the r...
[5 replies] Last: Got it at last :) Thank's for the explanation vlad from moscow. (by Pebble)
Checking if a char variable is equal in an if statement?
 
Hi, I'm taking a beginners course in C++. Our latest project is to create this program that sort of outputs a phone company bill based on a few user inputs. ...
[4 replies] Last: EDIT: Thank you! That worked. Originally I thought it didn't work but... (by JakeLunn)
if-statement wont work
 
Hello Everyone I'm new to to this forum. I'd appreciate it if someone experienced helped me with fixing my program. I Need to write a program that validates a ...
[4 replies] Last: thank you abishekm your advice was extremely helpful (by Marcel9478)
problems reading file into parallel arrays
 
I'm supposed to read a txt file into parallel arrays. The file is like this: Name number Name number etc. What I have compiles but doesn't output what it shoul...
[2 replies] Last: #include <iostream> #include <fstream> #include <string> using namesp... (by Yanson)
New object created on old in array, why?
 
When I create a new object with my Foobar class, it prints over the old object with the new information instead of creating a new. Simple example of my code:...
[3 replies] Last: ..\zinjai\sin_titulo.cpp:7:1: error: 'constant' does not name a type ... (by vin)
Deleting element from array
 
Hey all, I have code that is set up to delete an element from an array. The array works perfectly fine as long as the user does not input the 0th array element ...
[2 replies] Last: when you enter 0 the function on line 58 y = arrayA(fling, N); retur... (by Yanson)
Linked lists problem / class
 
its not liking the "head" or "next". 1>------ Build started: Project: HW_5b, Configuration: Debug Win32 ------ 1> main.cpp 1>c:\users\administrator\doc...
[3 replies] Last: #include "Employee.h" typedef Employee* ptrType; int main() ... (by s123456)
Help please!
 
I am taking an introductory course on C++ programming. My assignment is to create a program that will convert a Roman Numeral to arabic. My program currently wi...
[no replies]
Closed before chance to save
 
I was working on a program for a class and i hadn't saved it since i started working on it. The program I am using to make it froze and i had to close it out wi...
[1 reply] : which compiler u use (by kalicha)
Struct declaration and function returning struct question
 
#include <iostream> #include <cmath.h> using namespace std; struct element { string name; double weight; } data; element elementinfo (string el...
[7 replies] Last: well to be honest I'm running a pretty ghetto compiler at the moment t... (by infinity42)
March 2013 Pages: 1... 5556575859... 87
  Archived months: [feb2013] [apr2013]

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