Beginners - September 2013 (Page 3)

Getting wrong answers
 
I'm getting wrong answers with simple math. When I ask for something like: float answer = cos(samp...
[2 replies] Last: have you tried this? float part1 = cos(sample1 ); cout << part1 << e... (by Stewbond)
Class member variable initializes with = operator??
 
Output of the code is 25! How does the object of class opp initialize its private member? #includ...
[2 replies] Last: Thank Cubbi. And hence the explicit keyword! (by omkarchamphekar)
Needing help with passing numbers
 
I am currently working on a little program that will take a positive number and add it to the previo...
[1 reply] : Have you learned break; yet? Also it's because you don't add the ne... (by Stewbond)
Multiplying two matrices
 
Hi. I'm trying to figure out how to multiply two matrices. Here's my code so far. Is it correct? ...
[5 replies] Last: @Klipeti You're welcome! Happy programming!... (by condor)
by stacyd
I need to write a program in C++ that inputs in on format and outputs in another and ignore a comma
 
I have to write a program that inputs a name from a user; last, first, middle and output it first mi...
[9 replies] Last: I have tried moving the cin.ignore to between the cinlast and first al... (by stacyd)
need help
 
what is the output the c++ code shown above? my answer is 10_10, why is it wrong? Both a=20 and b...
[2 replies] Last: thx a bunch! (by linke2511)
I am stuck
 
ok I am new to C++ I am taking a computational Thinking course at College and in it we are doing C++...
[2 replies] Last: while (name != quit); should be while (name != quit) no semicolon.... (by Chriscpp)
by Ed4434
Fstream with dynamic arrays
 
Hey again, just another quickie; I'm writing a program to create and store profiles for a selecte...
[3 replies] Last: Umm.. thanks.. (by Ed4434)
do-loop help
 
Hey guys, I need a little help with this game I am writing for a project. I am having an issue with...
[9 replies] Last: // By Christopher Alfonso //cop1334c JC // This is a text based gam... (by Chriscpp)
call function
 
Hi there, can you use 7.89 as a function call or variable name? processData(product, 7.89,"nor...
[3 replies] Last: everything looks good but you may have a problem passing "normal" via ... (by giblit)
Pointer arithmetic on multi-dimensional arrays
 
Using an example of my book int array ; to access array the author says the pointer arit...
[2 replies] Last: Yes it helped a lot, thanks! (by MasterT)
by elfeck
Getting index from array-value in O(1)
 
Hello, I've got a dyn. allocated array like this: MyClass* myarray = new MyClass ; At some p...
[4 replies] Last: http://www.cplusplus.com/reference/iterator/distance/ essentially cove... (by keskiverto)
by Nebur
Decimal to binary too slow!
 
Hi everyone, i made a program that given a decimal natural number it returns its binary, hexadecimal...
[5 replies] Last: http://www.cplusplus.com/reference/string/string/erase/ (by ats15)
Program received signal SIGSEGV, Segmentation fault.
 
Hi, I am trying to write a program that calculates the product of two large, dense matrices. Whe...
[4 replies] Last: I know that a accesses an element. The problem was not with access... (by vkumar8282)
Counting WORDS in a String?
 
How can i count words in a string? so far im totally doing it wrong, i really need help! it has to f...
[11 replies] Last: @ Andy : OK, I could see a scenario where if the instructor does not ... (by Computergeek01)
by srk24
Armstrong number
 
Hi I am very new to c++ programming.I am just trying to check whether the number is Armstrong number...
[4 replies] Last: > since the Pow function inside the math.h converts the int to double ... (by JLBorges)
Pointer arithmetic
 
If I have an array int a ; Why do I have to do *(a + 1) = some_value instead of (a + 1) = some_valu...
[2 replies] Last: Ok it makes sense now. (by MasterT)
Using functions as parameters with arrays??
 
So I have written my code, the first part is fine utilizing a basic algorithm to find the max volume...
[no replies]
by donlxu
What's wrong with my code?
 
Hi. I'm trying to create a program to compute the Riemann zeta function which is defined as 1 +...
[2 replies] Last: It might not be because it's an assignment from my cs 101 class but t... (by donlxu)
Hollow square
 
Hi I need help in making this square hollow loop using for loop. ***** *___* *___* *___* ***** ...
[2 replies] Last: Ok so, here is the code #include <iostream> using namespace std; in... (by Zaki Al Qudah)
September 2013 Pages: 12345... 64
  Archived months: [aug2013] [oct2013]

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