Beginners - October 2016 (Page 35)

What are the Effects of this function
 
I am trying to understand the effects of following function: This is just an example of the function...there is not much body of the function given. We just ha...
[1 reply] : The effect is undefined behavior. Int1 and int2 are local variables ... (by Arslan7041)
by dnun99
Need help with these class errors on a basic math program
 
Getting tons of errors all of a sudden after adding a few things to this. I've been looking up lectures and guides and I can't get it to work. I've tried tracin...
[3 replies] Last: adding class Integer; into the header seems to have resolved the error... (by dnun99)
Having problem with setprecision.
 
I am having problem with my code printing out the Celsius 1 decimal place to the right. It is currently printing out two to the right. #include <iostrea...
[1 reply] : I tested your code and my output had celsius with one decimal place. D... (by joe864864)
arrays and error message
 
I have this program I am working on and I need to add a few things on it. I am new to programming and I am going by what books and a few videos say, but I can s...
[2 replies] Last: thank you for that answer, and I would add that for each car correct? ... (by ajtorres)
std::unique_ptr<X> not work after transition the ownership
 
I have a std::unique<X> which work nicely. but after I am using std::move or returned through the function, the new std::unique<X> not work. Here's my code: ...
[2 replies] Last: Oh, you're right. Thank u for helping me, Repeater. (by littlepig)
User-Defined Functions and Call-by-Value help
 
Hi guys, I'm new to programming and I'm a bit stuck on a certain program. I've found someone else on this forum who literally copy and pasted our assignment but...
[4 replies] Last: You are awesome!!! Thank you! (by ikovsten)
missing type specifier
 
For the life of me I cannot figure out why I'm getting this error on what I'm assuming is a very simple program. I have tried google and see a bunch of other pe...
[3 replies] Last: Dammit! Why didn't I see that! Sorry guys thank you!!! (by Tomallama)
need help with operator friend functions
 
#include<iostream> #include<iomanip> using namespace std; class PhoneNumber { friend ostream &operator<<(ostream &, const PhoneNumber &); friend...
[5 replies] Last: And 1 last question, how would you guys go about returning an array fr... (by PuppetMeat)
A few questions
 
This is for homework, I'm not really looking for the answers but I would appreciate some pointing in the correct direction. I think my issue is with the way the...
[2 replies] Last: That's what I thought they would have to be, but thank you. (by muffsez)
by Scuffz
store a long integer (20 digits) into a string then convert to an int array
 
I cannot store the value as an int because it is too large, so it has to be done with a string or char. I then must convert that to int array and add it to anot...
[2 replies] Last: oh I should have stated that long long would not work, or at least I'm... (by Scuffz)
Looking for input
 
Just looking on some input for this code that I wrote, I'm looking to improve upon it. I compiled it on visual studio. From testing, I believe that the code is ...
[10 replies] Last: Thank you this helped a lot, and as far as when I declared the doubles... (by muffsez)
by Nexx
Help With Loops
 
Hello, So I'm supposed to write a program that tells the user how much caffeine is in their body every hour after consumption. 13% of caffeine is eliminated fr...
[no replies]
by GTR4j
Sailing Ship Lab
 
After just over a year of zero c++ coding, I've come back to school and have been completely lost and my instructor gives us the first lab assuming we came fres...
[1 reply] : Please note that this is not a homework site. We won't do your homewor... (by Krulcifer Einfolk)
Trouble with average in loops
 
Hey everyone, so i am supposed to write a loop that calculates the average of the numbers inputed, once the loop has been closed. Ive tried everything i can thi...
[4 replies] Last: I did while(num!=999) because those were the instructions given by my ... (by tgould66)
by Dweebs
For loop (odd and even integers) question.
 
Hello, I am new to C++ and am taking a class at a local community college. One of our handouts shows how a for loop works, except I don't know how or what it...
[1 reply] : Well every other number is odd, or even, example 1,3,5,7,9 So when yo... (by SamuelAdams)
Problem with my program or MPL?
 
Hey, for my MPL assignment I'm supposed to create a function that rotates numbers clockwise. For example, 1 2 3 would rotate into 3 1 2. FYI: I'm unable to see ...
[2 replies] Last: yeah, I'm starting to think that too. Anyway, what I got was 3 1 2 12... (by andygarc1a)
Couple of odd errors
 
I've been trying to put together some basic stuff in C++, but gotten stuck here. Here's my main: int main() { PersonReg *reg= new PersonReg(10); Reg...
[no replies]
by fsfh60
Add functions
 
I made this calculator and now I need to change into functions but I am not sure where to start or how to do it. I need also to provide the following .
[1 reply] : Any one ? (by fsfh60)
i have no idea why my program isnt working
 
im getting the error messages "error: expected ';' before ')' token and error: expression cannot be used as a funtion any help at all is much appreciated //Th...
[2 replies] Last: thank you for the help! (by frostymcburg)
Something for my daughter
 
I'm working o a simple little program that can give my daughter a few answers to some simple math, but every time I try to get the thing to divide or multiply a...
[7 replies] Last: Here is a better way than calling main() while(true) { //progra... (by closed account LA48b7Xj)
October 2016 Pages: 1... 3334353637... 51
  Archived months: [sep2016] [nov2016]

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