Beginners - April 2013 (Page 15)

issues with getline and EOF
 
ok my program gives you the option to enter data manually or by file. my problem is I cannot figure out how to read from a file and take the data it gets from ...
[1 reply] : fin >> playerFirstName >> playerLastName >> myPlayers.home_runs >> ... (by SamuelAdams)
cerr
 
HI GUYS I has been reading a c++ program reference Manuel.It told something about cerr something related to cout and cin (I think).Is there really someth...
[2 replies] Last: ... (by MiiNiPaa)
[win32api] Save BITMAP to file
 
I have this code to capture whole screen as bitmap, how do I save it to file? I've been trying to find solution for over a hour, can't find anything working v...
[4 replies] Last: mfc is not far from plain api. In the OnSave() the mfc stuff is not... (by coder777)
progam to find the dividend
 
program is not working i'm newbie in this language please help me #include <cstdlib> #include <iostream> using namespace std; void compute_dividend() { ...
[2 replies] Last: it helps thnx (by Cherrykhan)
by ccwhat
explicit specialization
 
error C2912: explicit specialization; 'void bdi<box>(box &,box &)' is not a specialization of a function template. template <typename T> T bdi(T a, T ...
[6 replies] Last: ok, i'll check it later, dinner time :) (by ccwhat)
by Groups
Taking input from a file and storing it in a vector
 
Hi all! I'm working on a project for my C++ class that is essentially a calendar. One of the features of this calendar is to read user "appointment" files from ...
[1 reply] : a) Your overloaded operator is wrong b) Your overloaded operator isn't... (by MiiNiPaa)
How to get code to loop back to the beginning?
 
I have my code completely working but cant get it to loop back to the very begining. I need it to say "Enter the number of books in the sale" instead it says "...
[8 replies] Last: I expect responsibility from the people who ask for help, i suppose th... (by eyenrique)
Difference between short age; and short int age;? age is variable.
 
What's the difference beteween these three statements? int age; short int age; short age;
[7 replies] Last: Thanks backslashx00 and Zaita. (by Rehan FASTian)
quadratic formula via the non-void function
 
Your main function should acquire the values for a, b, and c and report the results of the function call ....where have I went wrong please help! thanks
[11 replies] Last: if( b*b-4*a*c > 0) { valid = false; } else { r1=(-b + sqrt ... (by Daleth)
A few problems with a simple program.
 
...
[2 replies] Last: ... (by haykography)
by giblit
Template problem
 
Okay so what exactly am I doing wrong here? //inside class template<class T> const double power(double, T); //outside class template<> const double math::p...
[2 replies] Last: still new to c++ I had no idea you could overload functions like that ... (by giblit)
by ryanz
Function Overloading & Array Problem
 
Hi guys, I'm fairly new to C++ (Just started a couple weeks ago) and I've run into much trouble with this question involving function overloading and arrays. I'...
[10 replies] Last: Got it!!! Thank you sir you have been great help to me tonight! I appr... (by ryanz)
help with using datafiles in arrays (1,2)
 
I am so confused on how I am supposed to write this program. The datafile "scores.dat" contains 1000 individual student scores (integers in the range of 0 to 10...
[33 replies] Last: Congratulation. You did what everyone expect of you: stop asking to do... (by MiiNiPaa)
Array() function help
 
The program I am trying to write but am very confused on how to do needs to generate 10000 random numbers between 1 and 5000 and produce some statistics on them...
[7 replies] Last: using namespace std; is a bad practice in C++ If you want to continu... (by MiiNiPaa)
Opening a file... yes i know..
 
Worn topic but still. My program complies without error, but when I run it, my check statement returns the message that the file cannot be opened. This file ...
[6 replies] Last: From Zhuge: Especially in cases where you are using an IDE, it can be... (by Alrededor)
why is my output data wrong?
 
my program should output the following data: Tom Jones has 3 home runs and 5 hits. Tommy Lee has 4 home runs and 9 hits. instead I am getting has ...
[1 reply] : This code is incorrect, you declare a playerStates object named tempSt... (by Yanson)
Arrays
 
Ok I'm stuck. I'm suppose to make a program using arrays. I've finished half the program, however, at the end I'm suppose to calculate the average, variance, an...
[1 reply] : cld u give the full code (by cyberdude)
help!!
 
need some help this is my program so far and below is the what it is suppost to do. thanks for any help!! Write a program that declares, defines, and call...
[10 replies] Last: Thanks! (by cmiller9732)
Void Functions
 
I need help writing a program that asks the user for an integer, then should call a void function, passing that integer to it, and producing a box using the int...
[7 replies] Last: Very nice! looks good another way to do it would be to just print it r... (by closed account 3qX21hU5)
Vector help
 
This program that I am confused on is supposed to use a vector of integers to keep up with rolls of a five dice. It should roll the five dice and store the sum ...
[2 replies] Last: I got it. #include <iostream> #include <vector> #include <stdlib.... (by Cluterbug)
April 2013 Pages: 1... 1314151617... 83
  Archived months: [mar2013] [may2013]

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