Beginners - August 2014

Losing elements when pushing to stack
The issue I am having is not all elements are pushing to my final list from my stacks. Hopefully the code and explanations will give enough detail. If there a...
Aug 31, 2014 at 11:11pm
[6 replies] Last: Alright I'll check into the link, but I am little confused of how to i... (by kamikaze pgmr88)
question
Write a complete program that reads an integer k > 1 from the console and finds the first positive natural number n hat is divisible by all whole numbers betw...
Aug 31, 2014 at 11:06pm
[15 replies] Last: You already have n and k as parameters, so they should not be masked. ... (by keskiverto)
Help with average function.
Im trying to write a code that computes the average of all positive numbers and returns that average number. Given the sum of all positive numbers is less than...
Aug 31, 2014 at 10:34pm
[2 replies] Last: Thank you so much! This really helped and I learned what I was doing w... (by painith)
by h4ever
Lambda - boost on Windows
Does anybody know why this code does not work on Windows? I see just black window and nothing is printed. Maybe the function calculating lasts too long? lambd...
Aug 31, 2014 at 9:36pm
[1 reply] : The program is waiting for user input. If input you 4 then hit enter, ... (by helios)
Print out digits of a number
I want to print out the digits of a number, and this program prints them but in reverse. How can I print them in order? #include <iostream> #include <con...
Aug 31, 2014 at 8:34pm
[1 reply] : They are printed in reverse because you print the least significant di... (by dhayden)
by TadyZ
Stroustrup, std_lib_facilities.h and load of error
Hello! at the moment i'm reading Stroustrup "Programming principles and practice using C++". I need to write my first program, "Hello, World", it uses std_l...
Aug 31, 2014 at 8:30pm
[1 reply] : See this thread for a solution: http://www.cplusplus.com/forum/beginne... (by admkrk)
Overloading '+'
Hello, Does this meet the qualifications for overloading the '+' operator? #include <iostream> #include <iomanip> using namespace std; double MySu...
Aug 31, 2014 at 7:57pm
[1 reply] : To overload an operator, at least one of the types that participates i... (by LB)
problem with Overloading
Hello everyone, I need to overload these two functions, the problem is, I am lots rusty in overloading. Please indicate me to my error and if possible, poin...
Aug 31, 2014 at 7:40pm
[3 replies] Last: Would this code be correct #include <iostream> #include <iomanip> ... (by hungrymouth)
Reference to array pointer issue
Hi I have a problem with a private class member which is a const reference to array. Here is the class: class SortResult { friend ostream &operator<<(o...
Aug 31, 2014 at 6:26pm
[1 reply] : You're storing a reference to a pointer which isn't sticking around. ... (by cire)
pointer won't hold a value
Hey guys I working on making a Deque, but right now I'm just trying to make one node with an integer value. The error I'm getting is: (pa1 is the main class)...
Aug 31, 2014 at 4:03pm
[6 replies] Last: Undefined reference means your are referencing something that has been... (by Lowest0ne)
problem with geting difftime
hi all why line 42 will give me Error: what im doing wrong? #include <iostream> #include <ctime> #include <fstream> using namespace std; void difc(); int m;...
Aug 31, 2014 at 2:52pm
[2 replies] Last: It looks to me like you are calling mktime incorrectly. Try correcting... (by kevinkjt2000)
What are the best programs to make c++ GUI
Im looking for a program to make my gui for my personal programs. only thing im finding online is QT
Aug 31, 2014 at 2:15pm
[4 replies] Last: @LB the actual form. I already have QT so im gonna try wxwidget. I wa... (by riseandtrade)
Hard Matrix question
I'm doing a practice problem, the question is long so it's better if I just paste it below. I wrote a code for it below but I can't seem to get it working. I d...
Aug 31, 2014 at 11:53am
[5 replies] Last: dest has only one element, from initialiation. Aceix. (by Aceix)
by h4ever
unknown escape sequence:
How to correct this error? args.c|35|warning: unknown escape sequence: '\-' [enabled by default]| char helpStr = {"Usage:\n\t-h\t Displays this help message...
Aug 31, 2014 at 9:40am
[10 replies] Last: Ok, now that we have realised that adjacent string literals are conca... (by JLBorges)
by vxk
Use of Pointers
I am sorry if this question is too long or badly presented .I am working on a small framework(open frameworks) and was going through its tutorials ,when i encou...
Aug 31, 2014 at 9:37am
[3 replies] Last: A: From http://stackoverflow.com/questions/9181782/why-are-the-terms... (by keskiverto)
what is a companion types ?
In my book i'm studying the size function of the string class in c++ and my book defines the type returned by this function (size_type) a companion types used t...
Aug 31, 2014 at 9:04am
[1 reply] : std::string::size_type is a member typedef - an alias - for an unsig... (by JLBorges)
by vxk
pointer objects
I was going through the following code in Bjarne Stroustrups book, when i encountered the following code : Shape* fct() { Text tt{Point{200,200},"Annemarie"}...
Aug 31, 2014 at 8:50am
[5 replies] Last: > where it is useful to use > Shape* p =new Text{….}; > instead o... (by ne555)
Sum of 2 strings in another string
This question is very simple but I can't figure it out, I know how to do it with arrays, but now I need to to it with strings. int main() { char A , B ...
Aug 31, 2014 at 7:52am
[1 reply] : C = A + B ; //this doesn't work This piece of code would not work.... (by Aceix)
limit number of object that can be created
i want to limit the number of objects that can be created for a class.... like for a class Student i want only two object can be created. as soon as user tr...
Aug 31, 2014 at 6:33am
[1 reply] : You could use a static factory pattern. But why would you want this ab... (by LB)
nested if else statement problem
everytime i run, the line "please enter a correct canadian province" keeps appearing even though i put a else before it. i guess im not doing it right. can som...
Aug 31, 2014 at 5:49am
[15 replies] Last: @nubforce You have a copy-paste mistake in line 30. 'yukon' should be... (by Yay295)
August 2014 Pages: 123... 40
  Archived months: [jul2014] [sep2014]

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