Beginners - April 2015 (Page 31)

by relgin
Define a class called Rocket
 
problem description: Write a program that defines a class called Rocket that represents a rocket. The class should contain the rocket's mass (in grams), the ...
[4 replies] Last: Instead of rockets, I think those are supposed to be doubles. (by fg109)
Help with my code please (C++)
 
I need help making it so it prints prime numbers only. Thank you for your help in advanced. ------------------------------------------- Example of how the code...
[12 replies] Last: Thank you everyone. The only part I needed to add to my code for it t... (by steph2015)
by Thecal
Reading from a file
 
Hey guys, Im trying to read from a file, line by line, with no specified number of values in the file. Check out my code: int main() { string x; ...
[6 replies] Last: This is your original code:[quote=Thecal][code firstline=15] while(... (by LB)
file reading problem
 
I am not able to display the name at the output screen, for example: i gv the name "ting", it shows ing only, whats wrong ? void manage_staff() // manage ...
[6 replies] Last: while (!staff.eof() && staff.get() != '\0'){ getline(staff, staffs... (by Aaron Vienneau)
Help with <iomanip>
 
I'm unable to get a properly outlined output of the results when the entire program is run. Could anyone help me with this function or introduce me to another t...
[3 replies] Last: You should put all those cout statements after your if and else statem... (by fg109)
(First time posting just joined) Having trouble with book lesson.
 
Hey guys! First time posting so hopefully I am doing this alright. I recently purchased this book named "Sams Teach Yourself C++ in one hour a day" ISBN: 97806...
[1 reply] : Is there a way to put a picture in. I have a print screen of what I wa... (by labbedavid)
what is mean of this declaration int (*a)[2]?
 
I saw a declaration like this: int (*a) What does this mean? Is this a two dimension array? How should I use it ? Thanks.
[5 replies] Last: Thanks very much, now I think I understand the difference. (by buddha87)
Craps game C++ with menu and chips! NEED HELP!
 
My craps game works but it doesn't compile anymore and it wont even execute anymore without errors. What am i doing wrong? #include <cstdlib> #include <...
[1 reply] : Your ending curly brace on line 121 that says it is the end of switch ... (by tscott8706)
by as4mvp
Copying 2d array into 1d array
 
Create a 2D array with 20 rows and 20 columns. Populate the array row-by-row with random real numbers (not integers) that range in value from 0 to 100. Copy t...
[8 replies] Last: Topic continued here: http://www.cplusplus.com/forum/beginner/162155/ ... (by LB)
How to write a loop to count a queue
 
I need to write a loop which will count the elements in a queue which also needs to work with a wrap around.. This is what I have but it doesn't work. int i...
[15 replies] Last: It looks like it should be. Does it generate the correct output for yo... (by LB)
output array
 
I'm getting every other line then then 0's being printed in-between. I suspect my while loop and how my array is set up is what's causing the issue...
[1 reply] : http://www.cplusplus.com/doc/tutorial/files/ (by shadowCODE)
Identifying Even Numbers In An Array
 
My assignment is to create an array of 25 random integers, ranging 1-100. It also has to tell me how many how many numbers (EVEN only) that are printed in the r...
[3 replies] Last: I realize with programming, you must pay attention to every single de... (by TarikNeaj)
by Thecal
Input file into array until eof. Help!
 
I am having an incredibly difficult time wrapping my mind around this concept. Any help is greatly appreciated. I am asking for help in learning how to read ...
[19 replies] Last: Do not change the content of the if statements, you are changing the l... (by LB)
by slour
bubble up sort in array
 
I am trying to sort an array using a bubble up sort, I can't get the sorted array to print. Yes I know a bubble up sort isn't the best sort but it is what I'm m...
[6 replies] Last: Thanks, for the feed back. (by slour)
Need help with reading/converting text file
 
Hello, I'm having a lot of trouble with this program. I need to extract things from lines in file. for example one of the lines would be: 2013-05-07-1430, DTW...
[2 replies] Last: Please Do not Double Post - http://www.cplusplus.com/forum/beginner/16... (by TarikNeaj)
by mabele
C++ Code
 
compiler
[15 replies] Last: In the code written above ? How are we validating if the triangle is v... (by mabele)
string
 
i want to remove the integer from the string.... #include<iostream> #include<string> using namespace std; int main(){ string name; cout<<"En...
[1 reply] : Please edit your post and make sure your code is [co de]between cod... (by LB)
string
 
user will give a string as input if the input is "123asd" then output will show only "asd"
[1 reply] : Possible duplicate: http://www.cplusplus.com/forum/beginner/162093/ Pl... (by LB)
arrays and structure. issues
 
The question is commented out on the program but it is what I am trying to get done. The problems I am having are the name doesnt show when the account number i...
[2 replies] Last: It looks like the rest of your program got chopped off. By the way, y... (by LB)
define itetrator for user defined type
 
The following piece of code uses iterator, but i am not able to understand why it is correct. According to http://en.cppreference.com/w/cpp/iterator/iterator ...
[1 reply] : In C++, pointers meet all the requirements of iterators, so they can b... (by LB)
April 2015 Pages: 1... 2930313233... 52
  Archived months: [mar2015] [may2015]

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