Beginners - June 2013 (Page 44)

Item object array and constructor
How can create 100 item object array with initializing constructor? I already tried a lot of ways but failed. main.cpp Create 100 item object array I...
Jun 4, 2013 at 1:05pm
[1 reply] : I already know how to do it. int main() { for (int i = 0; i < 100;... (by optimisez)
Umm Negative, Great....
When i run my code, i want it to stop at 0 or lower (if it some how glitches) but it seems to go negative... #include "stdafx.h" #include <iostream> #...
Jun 4, 2013 at 10:47am
[2 replies] Last: Ya give an update expression inside the loop body like this while (h... (by cyberdude)
/240 error and not passing value
I am getting a /240 error when running my program when it should output the next car value in the list. Also the speed value is not being passed. Why is this?
Jun 4, 2013 at 9:36am
[1 reply] : Simply never (I am repeating never ) write long code. I suggest you... (by vlad from moscow)
by Deduu
Is this Limitation of dynamic array?
Hi, I'm building an algorithm in which I want to generate some data using (for loop) and store them into array A. I created a function for generating these...
Jun 4, 2013 at 9:00am
[13 replies] Last: Well. I will give a try.. Thanks alot. (by Deduu)
Countdown while user types
So let's say I wanted to make a program wherein the user has to guess a password, but only has six seconds to do so. How can I make it so the timer counts down ...
Jun 4, 2013 at 7:24am
[1 reply] : Thread I answered before: http://www.cplusplus.com/forum/beginner/1027... (by MiiNiPaa)
need help with functions
Hey guys, I have to write three functions: zero_to_parameter, parameter_to_zer0, range. Program basically takes two positive integers from user:input1,inp...
Jun 4, 2013 at 6:05am
[9 replies] Last: I don't know what more to say. The answers are right in front of you. ... (by Chervil)
Stroustrup PPP Ch 4 drill
I can't figure out what's going wrong, the if statement seems to work randomly. The first part of drill is a while loop that reads two numbers, prints out whic...
Jun 4, 2013 at 5:41am
[1 reply] : 1.01 and 2.01 cannot be exactly represented in binary, so they will be... (by MiiNiPaa)
by a sk
values stored in public member variables
When the object a1 of class matrix is instantiated, the constructor matrix::matrix correctly gets the values for both public member variables namely no_of_rows_...
Jun 4, 2013 at 4:05am
[1 reply] : You have used the parameters of the constructor though you have not as... (by shacktar)
by Ch1156
Sams Teach Yourself C++ in 24 Hours book questions
Im following the Sams Teach Yourself C++ in 24 Hours book and I have some general questions that i'll post here in this thread for convenience. Ok so this is...
Jun 4, 2013 at 3:46am
[16 replies] Last: Read the posts above. All was already said. (by vlad from moscow)
by incxx
If statement problem
my code is like a cash register and it adds up purchased items then prints a receipt. When I execute my program, the prices do not seem to display nor add up on...
Jun 4, 2013 at 1:48am
[2 replies] Last: @AbstractionAnon I've made the changes you suggested however, when I e... (by incxx)
by DuaT
Starting off learning c++ ( first language)
Hello everyone, this is my first post on the fourms. I am 14 years old, and have decided to take up learning c++. At the moment i am a game artist. But i find i...
Jun 4, 2013 at 1:43am
[5 replies] Last: I also want to say that if you have never research programming before ... (by Hambone)
Where do I find hard exercises?
Im tired of stupid exercise like Write a program that is able to compute some operations on an integer. The program writes the value of the integer and writ...
Jun 4, 2013 at 1:37am
[5 replies] Last: This site right here for sure http://www.cstutoringcenter.com/ (by Hambone)
Help naming something?
I've been starting to put all my variables in private, and since i've been doing that I have no idea how to do anything anymore. Before if I wanted to name some...
Jun 4, 2013 at 1:24am
[2 replies] Last: You'd have to create an intermediate variable to hold the sword name f... (by Branflakes91093)
Need help with a Luhn Algorithm assignment
This is what I have so far. Here's what the assignment is about: Let someone enter 1-13 digits (it can be segmented or whole and it's their choice when to stop)...
Jun 4, 2013 at 1:24am
[5 replies] Last: Any help on transferring data between for-loops? (by tivanenk)
cin problem, kinda weird
New to c++ here, I created this code and for some reason the cin gets skipped with a certain case. The code is below #include <iostream> #include <cstdl...
Jun 4, 2013 at 1:22am
[3 replies] Last: I posted a reply but apparently it got deleted... Anyways, thanks for ... (by Hambone)
My first application, savings calculator
Hi guys, relatively new here. Decided to pick up C++ after a long time, and I'm still in novice mode. I'm studying from myself, through books, and my first at...
Jun 4, 2013 at 1:17am
[1 reply] : realinterest = (rawinterest + 100) * 0.01; You must use '.' to denot... (by Branflakes91093)
multiple constructors in same class
My code work if I do not implement newVehicleThree(automobileLetters); newVehicleInt(automobileNumber); in main. But I need to set the values into the construc...
Jun 4, 2013 at 12:29am
[1 reply] : When you create the new objects using the constructor, don't just put ... (by Ispil)
Code for checking palindrome doesn't compile
The error I am receiving is that "palindrome.cpp:14: error: no match for âoperator==â in âreversechar(((std::string&)(& line)), 0u, (line.std::basic_string<_...
Jun 3, 2013 at 11:28pm
[8 replies] Last: You could update your own function that it would work. For example s... (by vlad from moscow)
Copy constructior vs Overloaded assignment
Whats the difference between a copy constructor or an overloaded assignment? Is it that copy constructor implies that an object is created whereas with overl...
Jun 3, 2013 at 9:50pm
[16 replies] Last: Is this still true for passing parameters as reference? Is an identif... (by MikeyBoy)
by Deaven
Functions in a seperate file
Hey guys I am fairly new to programming( I know some python) but I want to get serious about it. I need some help in two areas in this question The first ...
Jun 3, 2013 at 9:44pm
[7 replies] Last: Ivor Horton's Visual C++ for Beginners will get you through all the ba... (by newbieg)
June 2013 Pages: 1... 4243444546... 49
  Archived months: [may2013] [jul2013]

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