Beginners - October 2011 (Page 53)

For loops
 
Ok so I am trying to write a program that will take a integer input like 8 and output "you ran the loops eight times 8=+7+6+5+4+3+2+1=35" so far I have #in...
[3 replies] Last: Depends on where/when you want the output. The easiest way is to ou... (by Gaminic)
messing with my friends
 
i made a little program to mess with my friends a little bit. here is the code: #include "stdafx.h" #include <Windows.h> #include <stdio.h> using na...
[6 replies] Last: ok thanks for the help (by even821)
delete
 
hello, If i want to search through the linked list and delete a node by last name and first name, how would i go about comparing string and delete the node...
[15 replies] Last: @Azagaros: "It seems to be the week of Linked lists all week." Scho... (by Gaminic)
Having trouble finding problem with code
 
O.k. guys. I've looked over and over this code and hoping maybe somebody can help me out. It's supposed to be a random card generator. You type in how many card...
[2 replies] Last: Wow. I have to say I never noticed that semi-colon had been placed the... (by Angelus1609)
Need help with a confusing homework assignment - shywolf91
 
I need help with a intro c++ class assignment: "Write a program that simulates an adding machine. When zero is entered it should print the subtotal of all th...
[1 reply] : Start by not thinking about code. Think about the problem. How would ... (by Moschops)
Variable scope problem?
 
Hi.. I'm following an example in my book but the code doesn't compile for me, it gives me errors. My errors are C:\Users\george\Programming\C++\PrimerPlus...
[1 reply] : When you include a *.h file it is pretty much the same thing as includ... (by Stewbond)
Vending Machine Advice
 
Basically there are no errors, I would just like to get advice and ask, is this a good proper type of coding for a beginner? Are there any bad habits that I am ...
[no replies]
Overloaded constructor
 
On my overloaded constructor for Node, I'm getting an error saying that 'No instance of overloaded function Node::Node matches the specified type'. What is the...
[6 replies] Last: line 35. Only thing I see that's obviously wrong is that you are re... (by Disch)
adding elements of an array
 
I'm having trouble getting the correct addition in my array. for (int k = 0; k < ARRAY_SIZE; k++) { if (contents .locker_num != 0) { avg_...
[3 replies] Last: Strange all looks ok to me. How about show the whole program or those ... (by sohguanh)
by xdega
Infinite Loop problem.
 
So. I have this small project for a school class. We are writing a simple driving quiz type program using if statements and switch statements and loops. I i...
[1 reply] : doh. Stupid mistake on my part. Forgot to fix the data types for the v... (by xdega)
Outputting fibonacci
 
okay so i have a loop that calculates the fibonacci series based on the 2 inputs and i want it to only output the last number. so the person enters the position...
[no replies]
by Akusa
Help with switch and if statements for assignment
 
For one assignment we had to "Read in a users score (valid input is 0 - 100) output a letter grade using the standard grading scale". I did that just fine. The...
[3 replies] Last: Glad to help :) Good luck! (by Tytrin)
Switch/Case Statement help!
 
/*This program uses a swith-case satement to assign a letter grade (a, b, c, d, or f) to a numeric score. I have to fix the problems in this program, I dont ...
[1 reply] : Please use [co de] tags for your code. (for future reference) What ... (by Danny Toledo)
if else value returning problem
 
#include <iostream> using namespace std; int score; int main() { int courseScore; cout << "Line 1: Based on the course score, \n" ...
[4 replies] Last: Yes, that was actually what I was going for throstur. Thank you. Can y... (by agreenman20)
function/class definitions and implementations in header files
 
Hi, I was wondering if there was any reason to split up function or class definitions and implementations between a header file and a cpp file. (ie definitio...
[1 reply] : It can help cut down on compilation times when you redo certain functi... (by firedraco)
by s10jam
Reading multiple lines from a file
 
I'm writing a program that would calculate BMI's for a set of individuals from a file. My code reads the first line fine, I'm just unclear on how make my code r...
[6 replies] Last: Thank you for the reply. I have read that it is always good practice t... (by s10jam)
problem with default case in a switch
 
every default causes the problem to close, and I need it to just reiterate the loop does anyone know why? #include <cstdlib> #include <iostream> using na...
[8 replies] Last: throstur can you not read it because it's poorly written or poorly p... (by bbathel)
Double check me?
 
Okay I'm on a assignment and I was hoping if anyone could look at it and tell me if it's good or anything needs to be change. I know the program isn't fully com...
[2 replies] Last: alright thank you, and the purpose of it is i have to script out this ... (by OoshieRawr)
bit shift problem
 
I wrote some simple (apparently not simple enough for me) code to try to familiarize myself with bit shift. The goal was to just use bits 2 and 3 and discard b...
[1 reply] : a<<2 evaluates to an int, so the most significant 1 doesn't get cut of... (by helios)
by Yezman
First c++ exam. Practice questions part 2.
 
[content removed]
[2 replies] Last: The Unnumbered one is actually making me angry, not only is the answer... (by Computergeek01)
October 2011 Pages: 1... 5152535455... 59
  Archived months: [sep2011] [nov2011]

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