Beginners - December 2012 (Page 57)

Baseball Simulation Program
 
Hello, I'm trying to write a Baseball Simulation Program and I need help. The instructions are here http://wikisend.com/download/477216/baseball.doc I hav...
[1 reply] : Call srand ( time(NULL) ); only once and at the beginning of your ma... (by toum)
help with loop
 
my loop is infinite when I try to reach the "CAP" value but it does stop when I enter the sentinel value. Can anyone help me understand why? // -------...
[7 replies] Last: Why is your do/while loop inside a for loop ? Your code should be f... (by toum)
string initialazation compile error
 
If i code the following, it compiles and works well: #include <string> #include <iostream> using namespace std; int main() { string s0 ("middle"); st...
[3 replies] Last: At the top of this page there is a button that says "Mark as solved". (by Peter87)
Please help with two dimensional array reading from file
 
my program is supposed to read 16 numbers from a file and input them into a two dimensional array. I then have to print a name then four of these numbers, end t...
[2 replies] Last: when I run the program it doesn't show the numbers in the text file, i... (by helpplease911)
2-D array and Printing name
 
So, basically, everything works fine in my code except for printing out the female matches name. "j" represents the spot in the array of the females name. I kno...
[no replies]
Populating a deck of cards not working
 
I am trying to randomly generate a deck of cards. The code I am using is almost correct, however it is duplicating one random card. In other words, I can genera...
[1 reply] : What makes you think you're generating a duplicate card? If I add eno... (by cire)
VC++ 2010 can't run this..
 
#include <iostream> #include <conio.h> using namespace std; template<class t> t max(t k,t m) { if(k>m) return k; else return m; } void main() { i...
[3 replies] Last: Replace line 3 with: using std::cout ; using std::cin ; Bringing t... (by cire)
Help with Access violation reading location.
 
Hello dear all c++ experts, I have headache and big problem, since I MUST submit my thesis code by coming week and I have some problems in its debugging. In a l...
[4 replies] Last: OK I do it if you need it now, also can you please rectify my code and... (by expert4c)
help with sizeof ()
 
So, our computer teacher taught us about this function recently and asked us to create an app to calculate the string size using the same for every other functi...
[1 reply] : sizeof is calculated during compilation. This means that the result of... (by hamsterman)
how to get back to the menu
 
Hi, so i am creating a nested menu using lots of if statements and switchs, once the user gets through all the options, how can i get them back to the main menu...
[1 reply] : don't worry i just realized what i need to do (by mcoliver88)
strlen() problem
 
Hi all, I am having trouble getting this simple program going. #include <iostream> #include <string.h> #include <fstream.h> void main() { fstream f...
[10 replies] Last: Ah, so the 'length' you are after is a count of how many lines the fil... (by Chervil)
Error: expected constructor, destructor, or type conversion before '=' token
 
I keep getting this error, i was up until almost four working on this program. All help would be appreciated. This is the code that gives me the error: stru...
[8 replies] Last: and for whatever reason if lc is not an array, the program compiles th... (by jlmckelvey91)
What is the limit on for loop boundary?
 
I really want to know what the limit of a for loop boundary is. By boundary I mean the constraint portion of the for loop. For example, the program that I am wo...
[13 replies] Last: The limit would be when overflow occurs while calculating a particular... (by Chervil)
-SDL- can you see what might be causeing no omage to get blitted?
 
Hopefully theres an obvious flaw, im been working on this ages, you might not need the header files but if you ask i will post them. i hate it when theres no...
[18 replies] Last: no, i tried a lot of things to see any image at all, i think nothing i... (by devonrevenge)
Stacks
 
I need help with the output please. The program is good when entering the seven numbers but it dont output any number when entering the number seven number into...
[7 replies] Last: @Incis B Thank you very much I got it working. Thank you to very one h... (by Amil Patel)
Two while loops
 
OK i am working with Robot C which is a C based program and I was wondering how I should go about my problem. (im in high school) I dont know if this is the w...
[14 replies] Last: No, what you think of is the function exit(), break; in this case ju... (by Ianprogrammer)
String comparision problem
 
Hello, I currently am having a problem figuring out how to compare the zip string to another variable checking to make sure it has only 5 or 10 characters...
[5 replies] Last: Thanks. You can call me 'sir' - in the very informal sense of course. (by Chervil)
External read function
 
I have this project where I have to make an external function read_account that allows you to read any type of bank account from an input stream, its signature ...
[8 replies] Last: I needs it to terminate when it sees the ">" char (by penny9key)
Letters to Phone Numbers
 
Here is my assignment: Write a C++ program that converts letters of the alphabet into their corresponding digits on their telephone. The program should let t...
[1 reply] : Line 81, you're missing a break; statement and an endl; (by AbstractionAnon)
URGENT!!! i have prob on struct n array.. need handin in few hours.. help
 
PLEASE..........i've been tried this for 2 days.. Write a program to calculate the grade point average (CGPA) of the student. Students are required to enter ...
[4 replies] Last: Stating exactly what the problem you're experiencing is would be a goo... (by MrHutch)
December 2012 Pages: 1... 5556575859... 65
  Archived months: [nov2012] [jan2013]

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