Beginners - February 2015 (Page 52)

Understanding function definitions with Pointer parameters
 
Can someone help me understand coding function definition for a prototype that includes pointers and arrays? After defining this function I want to print the su...
[1 reply] : First, you'll want to name the parameters to your function. Otherwise,... (by Zhuge)
Not understanding classes
 
Is this class Widget { int value; public: Widget(); Widget(int v); int get(); void bump(); }; int Widget::get() const { return value; }...
[5 replies] Last: http://en.cppreference.com/w/cpp/language/member_functions#const-.2C_v... (by MiiNiPaa)
What's wrong with the code?
 
The code below is the example on my new book. It shows different answers and the author didn't explain it properly, so, anyone tell me? I'm lost! #include <...
[7 replies] Last: Hi, Not sure if I am preaching to the converted, or that this is all ... (by TheIdeasMan)
Passing 2D array
 
I've written the following program. I am trying to pass the 2D array into function using pointer and change the value and reassign it into the array. But it ...
[1 reply] : Are your program: 1) Not compiles     * Is other code compiles cor... (by MiiNiPaa)
error
 
avg = runs / ( innings - notout ) my mvs keeps complaining about dividing by zero. but i entered innings = 45; notout = 43; runs = 6; ...
[1 reply] : Have you tried using the debugger to see what the values of the variab... (by Zhuge)
Stopping program at five significant figures.
 
So my last post ended so well I decided to ask another question. My next project requires me to write a square root function using z = (x + S / x) / 2 as a base...
[12 replies] Last: “Double S, x, z, etc…” Is that not initializing? This bit : ... (by TheIdeasMan)
by trunax
C++ Tutorial Basic Input/Output Bug
 
Hi, there is a bug either in the script or answer, if i run a compiler i get 154 as an answer (Enter price: 22,25 Enter quantity: 7 Total price: 154), not 155...
[6 replies] Last: Yes, so is it. Thank you.. (by trunax)
Best way to read and parse data?
 
resolved
[no replies]
Make a simple linked list
 
Write your question here. I am trying to learn about linked lists, and this function makeList() is supposed to create and return a linked list using input from...
[1 reply] : > I'm kind of lost. the error messages are getting more and more esote... (by ne555)
problem with sort function <algorithm> lib
 
Hi everyone! My problem looks like this: 1.At the beginning u have to insert an amount of numbers. 2.Next program counts the sum of digits of the number that ...
[4 replies] Last: > The advantage of this method over JLBorges's is that the sort will r... (by JLBorges)
by ct180
Boolean switch/selection structure?
 
Literaly the second day I've been working on this. I was given instructions to create a boolean switch program that would accept boolean values as input for a,...
[6 replies] Last: Just input the numbers with spaces between them. I.e., 1 0 1 instead o... (by dhayden)
Need Help Making a program to count spaces in a sentence
 
Write a function that will count the spaces in given sentence. Think about how your function header should look like. Write also a program to test your function...
[no replies]
Binary to decimal error handling
 
I'm having problems implementing this. The original program works, which is as follows: #include <iostream> using namespace std; int main() { char nextD...
[12 replies] Last: If I enter 10101, I get the error message, but then I get 21 in the n... (by dhayden)
if statement trouble
 
I have to make a program where it prompts the user to input a number between "zero" and "nineteen" and then have it translate it into spanish. If the number is ...
[4 replies] Last: @Mint It's a homework problem, and the user has to input a number tho... (by joecookjc)
create you own template class vector
 
// No answers
[no replies]
February 2015 Pages: 1... 505152
  Archived months: [jan2015] [mar2015]

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