Beginners - October 2011 (Page 31)

Having problems with "Football Ticket" Program
 
Im trying to write a program that will calculate ticket sales for 3 different ticket types and then add the sales together for a total dollar amount. The instru...
[5 replies] Last: Bump (by Jodezilla)
Whats wrong with my switch function?
 
I've been stuck on this for too long, I'm the issue has to be small. This is my code so far: switch(num) { case '1' || '2' || '3' || '4' || '5' || ...
[1 reply] : I do not think cases work like you think they work. Try case '1': c... (by Intrexa)
Adding Elements of Array
 
Hey Guys, I have made a simple program to add the elements of any arry using a for loop. #include <iostream.h> int main() { int x, i; cin >...
[2 replies] Last: My code was compiling, but when I ran it, after enterng all the array ... (by tejas1995)
by boston
Array help... please
 
Hi all - I can't get ahold of my tutor and it's due Monday. I can't get my arrays to work. I know the information is going into the array, but when I run displ...
[6 replies] Last: I got SO CLOSE to a working segment of code with: int i; fo... (by boston)
Loop only examining half of list?
 
#include <iostream> #include <fstream> #include <iomanip> using namespace std; int main() { long number, average, testagainsthi, testagainstlow, total...
[2 replies] Last: It does! Awesome, thanks. Quick response too! (by JamesGold)
by kw1991
URGENT THIS PROGRAM NEEDS TO BE WORKING FOR TOMORROW
 
im searching through a file with a for loop it says the number is not found even though the number is correct but if i keep pressing enter the details show up ...
[4 replies] Last: Just basic glazing over the code, quick question, is the data being re... (by Intrexa)
hi,i need help about a question
 
Hi my friends, i have a hard homework. And i have short limited time. i tried to solve it but after 4 hours i mixed everything in my mind. Can u help me ? nee...
[6 replies] Last: I would suggest using a class. That way your methods or functions coul... (by Binary Thoughts)
How do I copy a const array to a pointer?
 
I have a static const array: const int TrollClass::abilities = {14,23,6,6,23,9}; I want to send it through this method: bool CreatureClass::InitA...
[1 reply] : You have to make the function take a const int* instead. (by firedraco)
by KKlax
Switch Statement Closing Out Program
 
Hello everyone! My program is not doing what it should be doing, and I am at a lost as to how to repair it. This is not a homework assignment of any kind,...
[3 replies] Last: Thanks a lot! Worked like a charm! (by KKlax)
string replace modifications?
 
Is there a better way to replace the social security number and password with x's? Just looking for maybe a more practical way of doing this. thanks. #include...
[no replies]
Hidden Variables Not Recognised?
 
The other day, I asked for some help here in regards to a rock paper scissors program I was making, and what was wrong with it. After taking your advice, I was ...
[7 replies] Last: so why is my current method dangerous? (by Dalolguru)
defining template class functions in a .cpp file
 
hi Visual studio wont allow me to initialise my function in my .cpp file because it has a template. As a result its asking me to create another template in ...
[2 replies] Last: thanks (by Blessman11)
cin to a string- infinite loop
 
So I've got a menu driven by switch-case.. inside a do/while loop. one option of the menu is to add a last name into something. That option is set to input ...
[12 replies] Last: @andrew= cin >> x gets just a word, and if there is a space it gets no... (by S G H)
Vector - problem with traversing vector
 
I am trying to write a simple program and have been trying to do it for a long time now with no sucess so though i should now ask for the solution: c++ prime...
[3 replies] Last: An iterator doesn't know that it is invalid. If you wanted to do iter... (by ne555)
Repeat specific cout until it is true.
 
The variable/data type is a string named UN. I would like to repeat the same cout statement while the cin is not equal to my liking. Example: cout<<"Ketchu...
[5 replies] Last: Thank you Ben Duncan and WR417H!!! The devil is in the details! My {... (by kevwinpal)
by kw1991
can someone please help with these questions
 
i have a few questions that i cant answer. my program is for inputting student details into a file then searching for certain ones. here is my code: con...
[7 replies] Last: please i really need help with this heres what i tired but i know its ... (by kw1991)
singleton instance defined in the headerfile
 
hi Can a singleton's declaration be defined,be defined in a header file the one I've done below? (I know that the function with the instance has to be in a ....
[2 replies] Last: the in the tutorial used #define instead, its from this book on ai i b... (by Blessman11)
Rounding value and storing that value to variable
 
Hi folks! long time lurker here and decided to register since I couldn't find the answer to this. Im having problems with something. I want to be able to rou...
[7 replies] Last: Thanks Keineahnung, I did look at the code and tried to see if that wo... (by rapidxone)
do....while loop problems
 
I'm very new to c++, and having alot of issues with a project I have to do. The project is Write a program in which: A random integer between 0 and 500 is g...
[4 replies] Last: thank you so much, just did what you said and it worked finally, breat... (by kingbrummy)
Help with Search function.
 
Help, I have been working on this program forever and cannot get it to run. I am sure I am just missing something. Can someone help me out. Thanks so much! ...
[1 reply] : For starters, I think you want a function not a function pointer . ... (by moorecm)
October 2011 Pages: 1... 2930313233... 59
  Archived months: [sep2011] [nov2011]

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