Beginners - February 2014 (Page 56)

by BC300
Multiple Error Messages to Compile Program
 
I'm trying to build a program and get rid of all the errors. I think I solved some, but I still have many errors listed. #include <iostream> #include...
[5 replies] Last: ..... task is to take existing code I was given by my professor and ... (by TheIdeasMan)
My program is compiling even though it shouldn't. What flags should I be setting?
 
Codeblocks tends to often allow non-standard c++ code to compile by default. Usually, the assignments I submit compile in his compiler but this time it didn't a...
[6 replies] Last: > Codeblocks tends to often allow non-standard c++ code to compile by ... (by JLBorges)
Let's Play: Guess what this Variable should be!
 
So, basically we are trying to find the distance between a plane and the center of a ball in a 2D view of a pooltable program that shoots a ball that bounces th...
[4 replies] Last: Speaking of humour, I like this a lot :+D [quote=Danny Toledo] auto ?... (by TheIdeasMan)
by joon2k
having trouble using for loops..
 
HIhi, I've been trying out the great beginner exercises in this site, and I've got pretty stuck on using for loops. due to using matlab a lot, I think I'm proba...
[1 reply] : Hi Joon, In C and C++, arrays start at zero and end at size -1. So w... (by TheIdeasMan)
Problem with the return on a function
 
The object of this code is to simply take in a grade percentage like 90 and return a letter grade like A. The below code works on all floats given to it b...
[2 replies] Last: Thank you so much!!!! I added all the equal signs to the code and it w... (by bpedigo)
Driver Function?
 
I have the following program, and need to create driver functions to call the functions in the program. Can anyone help me out?? I'm not even sure what a drive...
[5 replies] Last: Just include the header file you already have (without the main() func... (by TheIdeasMan)
by ivan1
Time Limit on C++
 
Hi All, I want to end my c++ after, say 360 seconds, and get the output so far. Is there any way to do it? Thanks
[3 replies] Last: If you want the program to only execute for 360 clock ticks then that ... (by Smac89)
ATM machince algorthium and code
 
can anyone help on below requirement
[3 replies] Last: Sorry to say, but please write code in code format .. (by ButchCavendish)
My program complies but won't output what triangle it is
 
#include <iostream> using namespace std ; enum triangleType { scalene , isosceles , equilateral , noTriangle } ; void getlength (double & side1, double & sid...
[1 reply] : First please use the code tags. Here, this is better. #include <io... (by Garion)
string buffer problems/inputting on same line
 
Hey, worlds worst programmer here. I have a question on using the string buffer as I'm having problems inputting two numbers on the same line. Now, with names...
[2 replies] Last: But don't I still need the /*cin >> buf; x = atoi(buf.c_str()); cin... (by jackbruns28)
by bjt223
Helping to understand the problem.
 
So I got this: A government research lab has concluded that an artificial sweetener commonly used in diet soda will cause death in laboratory mice. A friend ...
[1 reply] : Yeah, I also wasn't sure exactly what they were saying but it is two n... (by Zhuge)
Code not working
 
Could someone please explain to me why this code isn't working? void letter_check (string letterGuess, string theWord) { int i = 0, length = theWord.siz...
[2 replies] Last: Hi utarinsyis, have a think about what is happening here and step thr... (by TheIdeasMan)
How do you getline and int variable?
 
So we have a text file with the following data: Year - Make - Model - Price 2011 Chevrolet Tahoe $30588 There is only 1 space between everything. There is a...
[no replies]
Input/Output using .txt files
 
I need to write a file that: a. Prompts the user for the name of an output file in which to store some integers. b. Opens a file with that name. c. ...
[2 replies] Last: @Smac89 Thanks, I forgot about that part! But I still have the problem... (by playitpro)
by jwilt
infile to array
 
I need to read from a file with multiple number sets. The number sets are not necessarily as long as the array, so I would need to have the start of the array e...
[1 reply] : I hope you realise you have not actually stated what the problem is. Y... (by Smac89)
Constructor default versus non-default
 
Simple assignment but my non-default constructor gives me an error that it's looking for 7 variables but finds none. I am doing exactly as the book describes a...
[7 replies] Last: I quite like the idea (and it does seem to be a bit of a convention) t... (by TheIdeasMan)
program that randomly chooses between add and subtraction.
 
Write your question here. I am trying to make a program that that randomly selects 2 numbers then either adds or subtracts them. I've learned how to make the r...
[2 replies] Last: make another random number generator in a range of 1 to 0 to determine... (by Cody0023)
trouble with function
 
this program is supposed to get a file throught CMD input redirection, and i have it working, but the function for average seems to keep giving me the wrong num...
[3 replies] Last: #include <iostream> #include <string> #include <algorithm> double av... (by xismn)
Area and Perimeter
 
I need help with something, I'm new to programming, currently doing an assignment that calculates the Area and perimeter of a Rectangle. I don't know what I'm d...
[4 replies] Last: Thank you so much guys! My first time on this site. So glad I found it... (by Kevin15663)
Standard Programming
 
Hi, I just built my first game. I've had no teacher, I'm just learning by myself. I know there are certain ways to do some things.. standardized programming. Is...
[9 replies] Last: Hi lorilew, Thanks for your feedback :) With pointers - they are jus... (by TheIdeasMan)
February 2014 Pages: 1... 5455565758... 60
  Archived months: [jan2014] [mar2014]

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