Beginners - February 2013 (Page 12)

Stream Manipulators
 
Write a statement that reads 5 successive integers into these variables that have already been declared: x1 x2 x3 x4 x5 . Then write a statement that print...
[1 reply] : You will not need an if-else, and you could also do it without a loop.... (by binarybob350)
Math errors. Loops problem solved.
 
I'm just writing this program based off some things we have been doing in chemistry. I couldn't get it to go to choice two without going through choice one. So ...
[2 replies] Last: One thing your missing for sure is {} around your if. if(choic... (by binarybob350)
setw()
 
Pretty confused about this. Textbook doesn't cover this in depth and I tried to find other sources but I'm just confusing myself even more... I'm not looking f...
[1 reply] : Your close. If you read about setw http://www.cplusplus.com/reference... (by binarybob350)
by fluffy
Sentinel Assistance
 
One is to write program to read a collection of employee data (hours and rate) entered at the terminal and to calculate and display the gross pay for each emplo...
[4 replies] Last: Thank you for your input, it was greatly appreciated. (by fluffy)
Multiple Files and Header Files
 
#ifndef ADD_H_INCLUDED #define ADD_H_INCLUDED int add(int, int); #endif // ADD_H_INCLUDED #include <iostream> #include "add.h" //imported the header ...
[no replies]
by Tired
''Undeclared Identifier''
 
Hi, Could anyone explain me why im getting a 1>TestDLL.cpp(7): error C2065: 'HpMpHook' : undeclared identifier error? I'm trying to figure it out ,...
[2 replies] Last: Ahh seems like that fixed my problem. Thanks a bunch! (by Tired)
Can't Define a String as another String backwards
 
//I can't see any issues with the way I was using to define String back as //simstring backwards, but I get an on Output Error, saying: //index out of range: ...
[4 replies] Last: That was just a guide, you'll need to use the appropriate functionalit... (by Chervil)
please help program not counting objects
 
i dunno why this program doesnt count the last 4 couts of the files. can someone let me know what i am doing wrong. #include <fstream> #include <iostream...
[1 reply] : Please, use code tags. Copy-paste your code=select icon "<>" from the ... (by eraggo)
My program isn't compiling
 
Hi I really need help finding the error in the following program: I've been trying to figure out what's wrong with it for the past couple of days and couldn't....
[1 reply] : In the following line you're trying to instantiate GradeOutput and cal... (by AbstractionAnon)
by ND04
Need Help With Odd & Even Integers STACK
 
I Would Like The Program To Generate 15 Random Integers Into Array a, Then Push Both Even and Odd Integers Into One TEMP Stack. The Program Will Separate All In...
[1 reply] : Let's Begin With Getting The Integers Into The Array. So, Instead Of ... (by TheGrayWolf)
please help. grade calculator.
 
1) Write a c++ program to read a series of integers representing a series of grades from a file. Read the data using an end-of-file loop for the outer loop. ...
[no replies]
Functions and classes
 
Hi, I'm trying to get a better grasp on functions and classes. I had a bit of a long break in between level one and two of my C++ programming classes, and I've ...
[4 replies] Last: Cool, thanks to both of you, that actually makes sense that I should b... (by xanthian23)
sum of odd numbers between 2 integers
 
Hey guys, I have an assignment for practice with for loop. I'm extremely new to c++ world and any help for this assignment is much appreciated. Assignment st...
[2 replies] Last: thanks a bunch! (by Hajrathul)
Shift vector in x axis (Lorentz boost)
 
The rest of my code seem to work alright without the section on the "Lorentz boost". I'm not sure how I should approach this - I have to shift my 4-vector by "b...
[4 replies] Last: Thank you for your help. I had to remove the "const" after "Vector4 Lo... (by vanessatse)
Program for prime number..
 
Is there anything wrong with this program??? #include<iostream.h> #include<conio.h> void main() { clrscr(); int a,b,c,d; cout<<"Enter the number"; cin>>a;...
[11 replies] Last: If the program needs to be extended, I'd recommend making a separate f... (by Chervil)
by Ch1156
Need help understanding bitwise operators
 
I am having a hard time understanding what bitwise operators do and how I would use them. I have a very clear understanding of logical operators but I just can'...
[18 replies] Last: What you can do with these are very limitless (I believe) try finding ... (by Smac89)
Problem with Sieving program
 
I'm writing an algorithm to perform a custom sieve by marking all values in a boolean array that are divisible by the numbers given as true. Then, it creates an...
[11 replies] Last: There is an array class in c++ that can do the same thing. (by Smac89)
by bumski
New line added in loop
 
When adding stucts to a vector, middle elements will have a blank line before the getline field output. When trying to compare fields will cause the comparison ...
[no replies]
Not declared in this scope error, anyone can help?
 
It says int i is not declared in this scope (do while loop) and I can't figure out how it can't be as I'm declaring it in the while condition, can anyone help m...
[9 replies] Last: Thanks, that helped! I dind't use and because I thought it checks && b... (by Gregzksi)
by M159LE
Reading lines from a file!
 
Hi all, I need help on how to read lines in a .dat file! I have the following in the file: 46780946 3750.40 W 250.00 D 1200.00 W 75.00 W 375.00 D 1200....
[5 replies] Last: @Rascal - you may find it useful to look at this related thread: http:... (by Chervil)
February 2013 Pages: 1... 1011121314... 67
  Archived months: [jan2013] [mar2013]

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