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...
[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...
[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 ...
[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...
[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 ...
[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...
[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...
[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...
[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 ...
[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 ...
[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...
[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...
[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...
[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...
[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...
[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 ...
[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...
[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 ...
[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 ...
[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...
[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.