Beginners - February 2016 (Page 13)

Code not printing out perfect score
 
I had to write a modular program that accepts at least 10 integer scores but no more than 20 and displays how many perfect scores where entered. I cannot figure...
[6 replies] Last: @jlb I believe I would have to! I went ahead and made the changes and... (by plsalinas)
Help with Code Blocks
 
I am coding a good amount of c++ programs on code blocks, but when i install codes blocks, and i close it uninstalls itself. I have the code blocks MinGW versio...
[2 replies] Last: When i close code blocks the shortcut to open the program is no longer... (by thedasherx)
Input and Output Project
 
C++ File I/O Project I need help to write a program that allows a user to use the keyboard to input the first and last names of 40 friends, up to 50 characters...
[6 replies] Last: Ok thank you for your help (by RGB 455)
by bjl311
how can i make my program output this
 
Example Output 1 (not a leap year, input is in bolded italics): Enter a year: <b>1800</b> Is the year evenly divisible by 4? Yes. Is the year evenly divis...
[1 reply] : No, you aren't :P. If I understand correctly you need 3 boolean variab... (by jgg2002)
How to read only positive integers and ignore the negative ones
 
I'm trying to write a program that will ask for 10 grades and return the average. If the grade is "-1", I want to ignore it and not compute the grade for it. Th...
[3 replies] Last: Oh smack me silly. Speaking of floating point exceptions, line 12 of m... (by dhayden)
by Timbi
Geremia's HMAC and SHA1 functions
 
I don't know how to use the function with class HMAC(HashAlgorithm *hashAlgo, uint8_t *k, uint32_t kl); I tried I guess any combination and it still...
[2 replies] Last: Thanks, strange that I didn't tried with & :) (by Timbi)
Iterators, ADT's
 
3) Write a program that uses a List ADT to store the numbers 10, 15, 25, 35, 70, 100, and 101. Write a function for your program named addToEach that takes an ...
[no replies]
Multiplying an int with a complex double in a for loop
 
Hello Everybody, I am trying to calculate a complex integral using the following code: #include <complex> #include <cmath> #include <iomanip> #inc...
[1 reply] : Here is an attempt at a solution, it indeed works. Any comment or idea... (by Silverwhale)
by admkrk
Random number distribution
 
This might be more of a math question. I need to get a random number that is assumed to be geometric with a mean of 25. I looked into std::geometric_distribut...
[2 replies] Last: It seems so simple the way you explain it. I was able to figure out th... (by admkrk)
Someone tell what is wrong with my code.
 
#include <iostream> using namespace std; int main() { int *p , temp ; p = new int ; temp = p; for ( int i = 0 l i < 5; i ++) { *p = i ; p ++; } ...
[2 replies] Last: And this is a classic reason to declare variables one per line, and wa... (by TheIdeasMan)
Car Payment Calculator need help
 
Need help with car payment calculator almost done just need help with totalpaidforcar and interestpaid I am suppose to have a number for each year but it just c...
[1 reply] : Hi, The compiler tells where the problems are: In function 'int ma... (by TheIdeasMan)
by Atrain
Compile error
 
Why wont this function compile? I think its saying I need a "{" or a ";". bool together (ER & e, int x, int y) { bool inX = false; bool inY = false; ...
[1 reply] : An else statement doesn't have a condition clause "()". (by jlb)
Simple question about classes declaration.
 
Good evening! Please, look at the following code: int main( ) { QExample::example( ); } I believe QExample is the class and "example( )" is a mehtod f...
[1 reply] : Gtk is probably a namespace. (by wizebin)
else error: expected a statement
 
I'm writing a simple program that takes two values and raises the first to the power of the second. The compiler is underlining that last "else" and giving me t...
[2 replies] Last: AHHHHH!!!! Haha I knew it would be something simple. Thank you :) (by grahfoster)
Help with value returning function.
 
Afternoon guys, so I am having an issue with my calcGPA function. It is not returning any value other then 0, and im not really sure why. It is probably somethi...
[3 replies] Last: You should learn how to debug so you can catch them in a minute instea... (by TarikNeaj)
class help
 
Can't figure out how to fix this, any help appreciated! Getting the error expected unqualified-id before ‘public’ I tried commenting out void reduce();...
[5 replies] Last: Hi, Do you have -std+c++11 or -std=c++14 when you compile ? Your comp... (by TheIdeasMan)
c++ class question (namespace/extra option)
 
Hi, I read some code and I need help to understand. 1/ toto:Toto:Toto() toto:Toto:~Toto() The 1st name is namespace, the second one is class and ...
[2 replies] Last: Hi, toto:Toto:Toto() toto:Toto:~Toto() Should be : toto::Toto::T... (by TheIdeasMan)
What's wrong with this code?
 
I'm getting the following errors: error C2143: syntax error: missing '{' before '<' error C2059: syntax error: '<' include <stdio.h> int main(void) ...
[1 reply] : include <stdio.h> should be: #include <stdio.h> // note the # ... (by TarikNeaj)
trouble getting decimal points
 
Hello, I'm having troubles getting an output. I want two decimal points in the output so for example: Enter yearly income amount (0.0 to quit): $ 45000.00 ...
[1 reply] : #include <iostream> #include <iomanip> using namespace std; int main... (by Yanson)
error
 
I'm getting this error when i compile error: ‘bool Rational::operator>=(Rational, Rational)’ must take exactly one argument bool operator>=(Rational r1, R...
[3 replies] Last: Here is an example #include <iostream> using namespace std; class I... (by Yanson)
February 2016 Pages: 1... 1112131415... 46
  Archived months: [jan2016] [mar2016]

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