Beginners - October 2017 (Page 12)

Returning local automatic objects from functions (1,2)
I'm reading through a beginner C++ course and I got to a place dealing with returning objects from functions. This part is about overloading operators. They ...
Oct 21, 2017 at 8:06pm
[32 replies] Last: OK, the only valid option for me where I am is a portfolio. Internshi... (by cristian c)
If statements and functions
Now my assignment is to write a C++ program that prompts user to enter first character of a square or a triangle (s/t). It should then calculate area of square...
Oct 21, 2017 at 7:59pm
[2 replies] Last: here.For some reason area of triangle always comes to be zero #inclu... (by closed account 1vf9z8AR)
by tagerR
What's wrong with my code
title #include <iostream> using namespace std int main () { cout << "Olá Mundo!\n"; return 0; } Thanks in advance.
Oct 21, 2017 at 7:38pm
[3 replies] Last: are you using visual studio? If so thats because it will be looking fo... (by heintzman)
c++
i wrote a code but take a false result. how i do for its run. i have to use function in class. its 4x4 matrix multiplication #include<iostream> us...
Oct 21, 2017 at 5:54pm
[2 replies] Last: thanks for help but " i have to use function in class." (by conquerorbh)
by Ndutta
Reading from a txt file, saving it into a parallel array and predicting the future date
Hey, so as part of an assignment, I have to write a program that "predicts the date, given a day" so for example, if I want to know what date it will be 5 days ...
Oct 21, 2017 at 4:57pm
[2 replies] Last: Thank you Handy Andy. I'm still trying to figure it out, but I hope I'... (by Ndutta)
Can't get my return values to properly work.
Hello There, I am a new Computer Science student and for our first project, we are supposed to write a program that will determine if 3 given points equal a r...
Oct 21, 2017 at 4:45pm
[5 replies] Last: Thank You So Much! I don't have much time to work on it right now. I h... (by Mjimmie1)
vector not returning expected value
Good day, I am trying to use vectors and classes to write a card class an expand my experience with these. My issue is when I try and print out the whole dec...
Oct 21, 2017 at 3:39pm
[3 replies] Last: Dang its always something simple I'm just not seeing, thank you! (by heintzman)
why is my program crashing
Hi guys so I stored a file into an array of char pointer and allocated memory to it and right now Im trying to make the words lower case and I ran into a proble...
Oct 21, 2017 at 3:30pm
[2 replies] Last: Ah I see, yea I didnt realize that my file had words more than 16 char... (by closed account EAk1vCM9)
line of code giving me trouble
hi guys I have come across a line of code while studying that is giving me trouble this is the block of code #include <iostream> int main() { co...
Oct 21, 2017 at 2:18pm
[11 replies] Last: so for example a = some memory address that holds the string "one"? ... (by Chervil)
This is a part o a bigger program. The display function is printing the last record twice. Can anyone point out my error?
#include<iostream> #include<fstream> #include<stdio.h> #include<iomanip> #include<string.h> using namespace std; class Hotel { int r_no; char r_type ; ...
Oct 21, 2017 at 1:14pm
[4 replies] Last: Hello riona riri, Chervil has very good suggestions here. I loaded u... (by Handy Andy)
Code review. How to make my code look better.
Hello, the task was: I have a binary file. I need to write int values to that file and then read and print them to console using my own iterator. My program ...
Oct 21, 2017 at 10:38am
[8 replies] Last: @JLBorges I appreciate it, sir. But I'm afraid that's a little bit to... (by Cppmiel)
Dice Game
Im so lost. Can someone please help. Im suppose to write a program that has a menu with the following options; a) Play Dice game, b) Display Odd numbers, c) Qu...
Oct 21, 2017 at 8:53am
[1 reply] : First of all "newflyyera" please format your code and make sure it is ... (by Xenophobe)
Counting characters
Im learning how to code and I have this homework where I have to show how many of each characters of a string are in the sttring, I using this #include <...
Oct 21, 2017 at 8:17am
[5 replies] Last: The approach from @AndreGS is ok, but the use of numeric codes in cha... (by Chervil)
Passing Read values from a function to another
I'm trying to pass all read values into a converter and have it convert each individual number into Mins/secs, but I'm not sure how to pass the Read values into...
Oct 21, 2017 at 7:52am
[3 replies] Last: My conversion void convert(int songLength, int &minute, int &second... (by Garribean)
Palindrome and prime functions errors
So i am working with code that has to do several things. It must add all of the digits of a randomly generated integer, reverse those digits, and also determine...
Oct 21, 2017 at 7:16am
[3 replies] Last: Making mistakes is ok and part of the learning process. In order to ge... (by Thomas1965)
I Need Help Please :(
its a vending Machine problem i need a program that displays 1. coke $1.20 2. Diet coke $1.00 3. Swiss Chocolate $1.40 4. Pulpy $1.50 5. iced coffee $1....
Oct 21, 2017 at 6:39am
[1 reply] : Okay, for starters, what have you done? :) It'd be a good point for ot... (by Little Captain)
rng game
my program produces same number even with rand(). first 5 times running it it does 4 2 3 1 4 no matter what if i rerun program it wont get new numbers #i...
Oct 21, 2017 at 3:34am
[1 reply] : You didn't create a seed. Use srand(time(NULL)); (by Hengry)
Extra newline in output
Hi all, I am writing simple command line programs using Visual Studio 2017 Community and compiling and linking through the Developer Command Prompt. My quest...
Oct 20, 2017 at 11:49pm
[2 replies] Last: Thank you for your reply. I also was trying to emulate the output in a... (by mlholder)
by sharbu
Time Limit Exceeded - Explanation needed
Select a pair of adjacent integers and remove the larger one of these two. This decreases the array size by 1. Cost of this operation will be equal to the small...
Oct 20, 2017 at 7:52pm
[2 replies] Last: Here is the problem. int min=Integer.MAX_VALUE; The assignment w... (by Cody0023)
by Sentoo
string Fraction
Hi peeps, mind helping me out with this code? I won't paste all the code but if need be I will post it. void Fraction::printFraction() { //So, I'm suppo...
Oct 20, 2017 at 7:32pm
[2 replies] Last: My project if working fine now. Thanks, Repeater! (by Sentoo)
October 2017 Pages: 1... 1011121314... 33
  Archived months: [sep2017] [nov2017]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.