Beginners - March 2015 (Page 37)

by cdin
C++ c-string substring problem
 
Problem: Implement the following functions. Each function deals with null terminated C-Style strings. You can assume that any char array passed into the functi...
[2 replies] Last: Note: You may not use any c-string functions other than strlen(). U... (by dhayden)
Matricies
 
Hello, I'd like to start by saying I am very new to programming. I am taking Computer Simulations in the physical sciences. So far it is going well. For one of ...
[2 replies] Last: You'll need to create and allocate the array at run time. Because of t... (by dhayden)
by camk16
Sequences
 
Here is the question: Write a program to compute, and later output to the screen, the average of an arbitrary sequence of integers entered, via the keyboar...
[12 replies] Last: Or just try changing the set precision to 3 instead of 2 and see what ... (by thomaselder84)
Coordinate conversions
 
I need to convert one coordinate type to another, The first coordinate type has distance, angle to the right, and angle upwards. (We'll call these d,h, and v...
[6 replies] Last: Cool, got everything to work. Thanks! (by DarkLightHitomi)
by camk16
What's wrong with this?
 
int x = 0; while( x <= 0 ) { cout << x << endl; if( x == -1 ) cout << "Negative" << endl; x--; } Logic error?
[6 replies] Last: Perhaps the answer is just that: that it is illogical to have a loop g... (by camk16)
by thor36
Can't successfully compile libcURL sample in CodeBlocks
 
Greetings all I am trying to compile this sample libcURL code: #include <stdio.h> #include "curl/curl.h" /* For older cURL versions you will also nee...
[2 replies] Last: Sir thank you very much, that was it! =) Can you please explain me wh... (by thor36)
by Bjord
Too Many cin Inputs Required
 
I am trying to write a simple program to better acquaint myself with if, else if, and else statements. The program works as expected up until the first respons...
[5 replies] Last: I only see you asking for input twice in your example. Could you post ... (by Zhuge)
by alexBB
How to extract real part from complex number?
 
I'll tell you c++ is phenomenally difficult for a beginner. I need to extract the real part from a complex number. My compiler is g++ in Ubuntu 12.04. Nothing ...
[8 replies] Last: Everything, everything is working now. Thank you very much for your he... (by alexBB)
What is the correct way to declare a function with no Input?
 
So I Want to have a function that gives an output but has no input. Which is the correct code? double __stdcall GetSomeNumber(){ return SomeValue; } ...
[2 replies] Last: Both are correct. void in argumnet list is a C leftover which does e... (by MiiNiPaa)
Need help compiling a payroll program
 
I think I'm pretty close. I'm getting an error "no default constructor exists for class "Payroll"". I'm wondering if I have to put in another constructor in the...
[6 replies] Last: Payroll total(int i, double r, double h, double p); Declares a funct... (by MiiNiPaa)
Is it possible to...?
 
Below are my coding. It runs very well. However, as you can notice, there are several functions that are exactly the same but due to different class thus I coul...
[no replies]
HELP!
 
I am supposed to compute a factorial where The program asks the user for input, and stores it in userInt, A loop is set up to compute the factorial, The loop st...
[5 replies] Last: It can be a for loop or a while loop. I am doing a bad job of explaini... (by nvizibl)
I have no idea what I am doing... Please help me!!
 
I have no idea where to start on this program. Here are the specifications that I am supposed to include: The function will determine which candidate won an ...
[11 replies] Last: Did you read through the part about loops on this site's C++ tutorial?... (by fg109)
Unable to run
 
I have been try to get this program to run for weeks now but but it is show errors i dont understand. Here is the code: #include<stdio.h> #include<stdlib.h> ...
[no replies]
by Orval
What are Operators and Inlines?
 
What are Operators and inline? I've read and typed the first 2 examples of operators from the book im reading. The author isnt explaining it very clearly to me....
[1 reply] : I differ thee to thy all-mighty reference: Operator overloading: htt... (by IWishIKnew)
by sick09
Who wants to be a millionaire game
 
Base on the rule, there will be 3lifelines that you may use. But you can only use each of it once. How can I make those lifelines be used only once? this is...
[no replies]
trying to count numbers and words in a txt file
 
I'm trying to count numbers and words in a text file. Is it possible to run two counts simultaneously. This is coming up with multiple errors... // Varia...
[1 reply] : Read in each white space delimited token as a string. Then check if th... (by JLBorges)
PLEASE HELP!
 
Hi there, Can someone explain a few things for me: 1. What is an arbitrary sequence ? 2. How would I calculate the average of an arbitrary sequence?...
[3 replies] Last: average as in sum and divide? To end the sequence you could use if st... (by chouhaizi)
by alexBB
Class definition causes error.
 
I am trying to compile an fft.ccp file from this website: http://www.librow.com/articles/article-10 Currently I have troubles with a private header file (comp...
[5 replies] Last: This has nothing to do with the code. Open a shell and run g++ --vers... (by LB)
I need help populating multidimensional vectors using recursion
 
Hello I started my programming course at the start of this year, and am new to C++. I've been working on making a maze for the last 2 weeks as a project game...
[2 replies] Last: This is the new code for my maze currently without the drawn map lim... (by Neobeum)
March 2015 Pages: 1... 3536373839... 51
  Archived months: [feb2015] [apr2015]

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