Beginners - March 2013 (Page 43)

[Question] What happens if you close the window (or there is a crash) with a ostream open?
 
So, I made a debug class. It works just like std::cout and other streams. I just do "debug << SomeMessage<< endl;" and it then debugs the proper code to the pro...
[2 replies] Last: So, I should be safe then? Awesome. Thanks. (by angellus)
Array is not reading out anything after rand()
 
I'm trying to understand why I cannot read out and see what the random function filled my array up with. I initialized my array to spaces. Then I thought I f...
[1 reply] : do { suit = rand() % 4; face = rand() % 13; } wh... (by firedraco)
object return type for a class template function
 
My book has the following header for a class template overloaded = operator: template<class T> SimpleVector<T>::operator=(SimpleVector &obj) My issue is ...
[3 replies] Last: You're right, there shouldn't be a const on there: template<class T>... (by firedraco)
A little trouble with constructors...
 
My assignment for my college C++ class was to create a pseudo piggy bank in wwhich you can add or withdraw change, and then print out the balance. My Professor ...
[2 replies] Last: To expand on what ne555 is saying is that you should not put 'int' in ... (by jchundt)
Need help with a tic tac toe program (1,2)
 
I'm created a tic tac toe program for my programming class and I'm having all kinds of trouble. Here's what I have so far //----------------------------------...
[24 replies] Last: You aren't using the bool returned by playAgain(). You can do: bool... (by Lowest0ne)
Determine the sum of the even numbers between 1 and n
 
Determine the sum of the even numbers between 1 and n. n is specified by the user. Allow the user to repeat the process terminate if the user enters zero (0) ...
[3 replies] Last: This should do the trick #include <iostream> #include <iomanip> usin... (by Xilonian)
CONVERTING TO INPUT FILE
 
//I need to convert this program to read from input file. I know how to create the data file but I am strugling with how to code in fstream #include <iostream...
[2 replies] Last: I need to convert this program to read from input file. I know how to ... (by Godwin5174)
Need program to repeat, and end if 0 is entered
 
Here is my code. // compute the sum of even numbers between 1 and n #include <iostream> using namespace std; int main() { ...
[1 reply] : Use a outer do loop. You also have the same code repeated twice which... (by binarybob350)
by Jace
Calculatron 2000
 
#include <iostream> using namespace std; int a; int b; int operation int operation1; int operation2; int operation3; int operation4; int main() { ...
[1 reply] : int a; int b; char operation; int main() { cout << "Hello and wel... (by binarybob350)
Having some trouble formatting output
 
My program has a few values it out puts on different lines using a loop. Basically each line needs to look like: Name Goals Assists ...
[4 replies] Last: Got it to work! Thanks for the help. (by Xilonian)
C++ Question
 
I'm coding a new script for mw2 and I have a quick question. I want to create a value in the person. where would I create the self.emp value? i have coded...
[no replies]
Don't know where to start..
 
This is an assignment for my class, and I honestly don't know how to approach it. Anyone have any suggestions? It's not like any other program he's asked us to ...
[4 replies] Last: To turn that into a table, there are two changes needed to the design.... (by Chervil)
C++ help - read/write to/from file
 
#include "stdafx.h" //dont worry about this heading, its automatically generated #include<iostream> #include<cstdlib> //for system commands usin...
[3 replies] Last: do #include <fstream> to read ifstream File ("filename"); to write... (by greenleaf800073)
How to find vowels WITHOUT using array
 
Here is some code I have to do for class. I was wondering if you guys could tell me what i am doing wrong... it isn't wanting to compile. It sucks. It gives ...
[6 replies] Last: Line 76, I suggest setting num1 to 0 before using it as an arguement i... (by Smac89)
i need help whit my code
 
i am confused, i would appreciate any help and thanks in advanced. the code is suppose register the number of 20 seat and the name of the person in this ...
[no replies]
Finding Factors with a twist
 
Total programming newbie here looking for some guidance. So I have this assignment where I need to write a program that takes numbers from an input file and ...
[3 replies] Last: Thank you both. Got all working to how I need to for the assignment. ... (by spesh39)
error string subscript out of range- WHY???
 
/** Find words in stream, places them in a string, finds the beginning and end position of the interior letters of the word and creates a string to hold th...
[1 reply] : What line is the error occurring on? And please use [co de] tags.... (by Zhuge)
by ilija
help with moving
 
here is my question I want to make a ball move anywhere on the map but I can only make it move forward can anyone write a step back,left and right so that i ...
[7 replies] Last: Look at this: http://www.cplusplus.com/forum/general/94461/ It is diff... (by Vidminas)
Program not starting, need some help.
 
This is my first post ever, so go easy on me. I'm trying to run this application, but for some reason it's telling me that it cannot run because it can't find t...
[2 replies] Last: Wow I'm so bad at this. Thank you very much. I'll never make this mist... (by PizzaBun)
calculator
 
how can i do a program that will input a 4 different numbers and operators??.. like this ( 7 + 2 - 6 * 4 / 3 )please help me... thank you for your cooperation....
[7 replies] Last: Hah, thanks, I know. Everything works, you just have to add parenthese... (by Vidminas)
March 2013 Pages: 1... 4142434445... 87
  Archived months: [feb2013] [apr2013]

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