Beginners - April 2017 (Page 24)

by xxvms
Why???
Hi there I have bit of puzzle with this code, (again from book Programming Principles and Practise Using C++) In short this code should check for repeatin...
Apr 10, 2017 at 2:28pm
[5 replies] Last: Hi Lastchance thanks for detailed explanation! I was doing more exer... (by xxvms)
by xxvms
confirmation
Hi everyone :) I want to confirm my suspicions, when I execute this code, when I print line (Middle with double) I am getting correct result 2.5 However l...
Apr 10, 2017 at 2:12pm
[2 replies] Last: Thank you Coder777 :) (by xxvms)
Arrays and Random Numbers
So I'm supposed to write a program which declares an array which can hold 50 int values, and we have to use a loop to fill the array with 50 random numbers and ...
Apr 10, 2017 at 11:35am
[3 replies] Last: int main() { const int min_value = 1; const int max_value = 5... (by alonso12)
Why isn't the constructor of this class being called?
I'm trying to understand an example given in my textbook. According to the answer key for the textbook, the program at the end of my post will display the foll...
Apr 10, 2017 at 8:08am
[7 replies] Last: At the risk of sounding a little pedantic, that's not the most vexing ... (by mbozzi)
C++ Rock, Paper, Scissors Function Woes (1,2)
Hey guys, so I'm having a bit of trouble with my homework and was hoping someone here would be able to help me. My win, lose, tie functions are giving me a bit ...
Apr 10, 2017 at 7:18am
[25 replies] Last: #include <iostream> #include <iomanip> #include <cstdlib> #include <c... (by khovsepa)
Storing std/boost::arrays in a vector
Since I assume this wont make a deep copy of the array (but instead just copy the pointer) I was wondering what is the proper way to store a copy of std or boos...
Apr 10, 2017 at 4:57am
[3 replies] Last: @JLBorges Great so the a duplicate would be stored in the vector. Look... (by zoran404)
Trouble trying to include another header file
I am exploring with using the implementation and separating my code into different header and source files. I have a class Security that is defined in securit...
Apr 10, 2017 at 3:42am
[2 replies] Last: Awesome! Thanks that's a big help! I was trying to mess around with #i... (by bmakloski)
by rantiv
Working with Objects and classes
Im having trouble making my functions in the main work. The function isnt outputting correctly. It should look like this when option o is entered: OUTPUT SHO...
Apr 10, 2017 at 3:35am
[15 replies] Last: Yes Andy, this has helped tremendously. Thanks for also giving an expl... (by rantiv)
Trouble overloading ==operator for comparing 2 queues
I built this previously to compare 2 linked lists and it worked great. Now I'm trying to use it with a queue that uses a linked list and it always returns true ...
Apr 10, 2017 at 2:35am
[4 replies] Last: Thank you! Professor is losing it, her instruction literally says "Rem... (by joe864864)
Homework Assignment Error
I am having trouble with an array exercise from my textbook. The Assignment is: Largest/Smallest Array Values Write a Program that lets the user enter ...
Apr 10, 2017 at 2:19am
[2 replies] Last: std::minmax_element (C++11) fetches the minimum and maximum values tog... (by gunnerfunner)
Please help
Write a recursive Boolean function isMember. The function should accept two arguments: an array and a value. The function should return true if the value is fou...
Apr 10, 2017 at 2:04am
[2 replies] Last: This appears to be a popular question lately: http://www.cplusplus.com... (by gunnerfunner)
Guitar Tuning Visual
Hey guys I am new to C++ I am suppose to write a program one-character input (A-G) in C++ and then making some kind of fun/interesting visual output to the sc...
Apr 10, 2017 at 1:58am
[no replies]
Homework help needed please
I need help with my programming homework I been having problems with for loops with arrays can someone give me examples the details are located in the class...
Apr 10, 2017 at 12:55am
[no replies]
Infix to Postfix
A little lost. Program is not working properly and I'm sure there are a lot of errors. Please help. #include <iostream> #include <string> using std::co...
Apr 10, 2017 at 12:05am
[no replies]
by llll
need help with simple string to int code
Hi, I have this small code where I first have an array of int from string, then for each int I multiply power of 10 based on next number, so if next number is 9...
Apr 9, 2017 at 8:50pm
[7 replies] Last: I believe my method is synonymous to yours I beg to differ. at lea... (by lastchance)
code not working
my code is not taking 2nd character input. i don't understand what is the problem with my code. plzz help me? here is the code.. #include<stdio.h> int ...
Apr 9, 2017 at 7:22pm
[2 replies] Last: Hi there I have tried to fix your program but because I don't know whe... (by xxvms)
Using class object in another class
Im getting an error: use of undeclared identifier. I created an class with its own .h and .cpp. We'll call this ClassA and created a second class with in its...
Apr 9, 2017 at 6:59pm
[5 replies] Last: Including one header in another header gratuitously is bad practice. ... (by JLBorges)
Need some help with Midterm Assignment
Hi, I am currently working on one of the three assignments for my midterm project and I am having a difficult time using pointer as my professor is asking in ...
Apr 9, 2017 at 6:47pm
[11 replies] Last: It's fine, then. I'm glad that that you were able to learn/understand ... (by JLBorges)
output problem: setw related
I am having a formatting issue that seems like it should be easy to figure out but I am having trouble. I need the format as follows. Smith, John ...
Apr 9, 2017 at 5:33pm
[9 replies] Last: I am an idiot. I missed a minute detail of adding lastname + firstnam... (by viorage)
Debug Assertion Failed
Im new in c++. This is for the first time I have this type of error. It works well until when the debug reached the end of void main, the error appear. The out...
Apr 9, 2017 at 5:33pm
[2 replies] Last: So what should I do: First CBinary(const CBinary &temp) { len=temp... (by Katie000)
April 2017 Pages: 1... 2223242526... 34
  Archived months: [mar2017] [may2017]

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