Beginners - November 2015 (Page 47)

Class, trying to get my .cpp file to work
 
This is the header file of Unit #include<iostream> #include<string> #include<vector> #include"Weapon.h" #include"Item.h" #include"Armor.h" #include"Materia.h"...
[1 reply] : that should work. It would help if you told us the actual issue. Y... (by mutexe)
Setprecision and break problem
 
1)For some reason my output for total keeps coming out in a high numbers although the math should result in a small number, it happens even though I'm using set...
[1 reply] : Line 38 and 41 are wrong. It doesn't work like this. Just remove line ... (by coder777)
by halciu
Need help computing the volume of a cylinder using repeated addition
 
Hi, I need to write a program to compute the Volume of a Cylinder by Repeated Addition. I am not allowed to use the regular formula V=PiR^H This is what I...
[5 replies] Last: Volume of a cylinder is V = pi * (r^2) * h btw, not r^h. That would ... (by YFGHNG)
If Statement [C++]
 
Hello! I have recently started learning C++ using Programming: Principles and Practice Using C++ by Bjarne Stroustrup. Through out the book, there are many "D...
[2 replies] Last: Perfect, thanks! (by SheedoCodez)
Question on generating weird elements
 
I need to generate a vector such that [6, 5, 4, 3, 2, 1, 7, 8, 9, . . . , n − 4, n − 3, n, n − 1, n − 2] for n = 100, 200, 400, 800, 1600, 3200, 6400. ...
[6 replies] Last: #include <iostream> #include <vector> int main() { const int N =... (by JLBorges)
Functions and Scope
 
Hello, so for my variable 'colorfamily' the value is set by the user in the main function. I cant figure out how to get that value to carry over to be used in a...
[2 replies] Last: Use code tags please. http://www.cplusplus.com/articles/jEywvCM9/ ... (by integralfx)
Recursion to Iteration
 
Need help with explanation on converting recursion to iteration please. BEGIN SEQ (n) IF (n EQUALS 1) THEN RETURN 3 ELSEIF (n EQUALS 2) THEN ...
[no replies]
Help with Dynamic Arrays
 
I am having problems with an assignment using a dynamic array of chars and pointers. I am supposed to create a dynamic array, fill the array using pointers, and...
[4 replies] Last: Mystery solved http://www.cplusplus.com/forum/beginner/151620/ (by closed account 48T7M4Gy)
need help getting my code to run
 
//Audy L Sain //Week 8 Assignment 1 //Geometry Calculator #include <iostream> #include <iomanip> #include <cmath> using namespace std; const float pi = 3.1...
[4 replies] Last: sorry. I'm new to all this, I just started writing code like two month... (by closed account yTRM92yv)
by iR3MiX
Need Assistance w/ Void fxs
 
Hi all, I have a problem with void functions. This program is supposed to be setup with the only two global variables (which I've added)and with void functions ...
[9 replies] Last: Got it thanks for your help :D (by iR3MiX)
No such file or directory
 
Hi, Don't know why it isn't compiling for me could someone help me please and try to make it as easy as possible to understand #include <iostream> ...
[2 replies] Last: You are missing a return statement in main. (by herd90)
by Muney
Need some Clarification on Function Problem
 
I've been stuck on this problem for a while now, I seem to complicate the problem or so I'm told. The problem https://gyazo.com/c3ff55a0cd8115dbe7bec96c69e0610...
[5 replies] Last: Then post the error messages along with the code that generated the me... (by jlb)
by tktktk
Operator>> no match
 
I have a code that reads two names into two different arrays, and it is saying that the operator>> has no match Here is the important part of the code: #inclu...
[2 replies] Last: Thanks! That did it. (by tktktk)
Average of 3 numbers
 
Using my code the average is always coming up weird. When I commented out the average to see each value, the numbers were coming up as very weird. For exampl...
[1 reply] : cin >> dblnum1, dblnum2, dblnum3; That's not how it's done. Change... (by TarikNeaj)
by Edgy
Making a string array of Char array
 
This is still a work in progress, but my question is this-> I am trying to make a string array that stores each char in a sentence until a whitespace or \0. C...
[1 reply] : Line 29 needs to be: chars = tolower(chars ); because tolower o... (by magnum pi)
question with non-comparison sort
 
Hello, I am trying to find the correct index from the countsArray I have. The countsArray (which was populated in the first pass through the students array) inc...
[14 replies] Last: Yes, I thought so. Don't worry, you will get the hang of it. You are p... (by Kevin C)
by Suar
Arrays and Pointers.
 
would it be possible to use pointer notation, *array or *(array + i), within the body of the function if the header uses array notation, int array ? if so, Expl...
[1 reply] : Yes, it's possible. (by helios)
Need Help with Date Program
 
No longer need help
[8 replies] Last: Its very long but it gets the job done so I am content. To be bruta... (by TheIdeasMan)
by Hah09
Just Started! Looking To Learn!
 
literally just signed up to this site and I am looking for/in need of some help! I have recently just started university and I have never coded c++ before in my...
[5 replies] Last: for(int day=1;day<7;day++) cout << " " << " "; for(int day=1;d... (by Kevin C)
slicing
 
hi, can you please tell me why 1 is printed and not 2 ? b's properties was copied to a, doesnt it? class A{ public: int n; A(){n=1;} int g(){return n;...
[4 replies] Last: My compiler responded with: line 15: error: 'initializing' : cannot c... (by Kevin C)
November 2015 Pages: 1... 4546474849... 53
  Archived months: [oct2015] [dec2015]

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