Beginners - October 2014 (Page 63)

by Ganado
Deque random access vs vector
 
While reading, it says that a vector's memory is continuous, while a deque's memory is not. So how then, I'm wondering, is random-access ( my_container ) still...
[4 replies] Last: Thanks for the replies! I get what you mean encapsulation, it makes se... (by Ganado)
random numbers
 
Hi am having a problem trying to generate random numbers in my program and I need some help. Here is my situation. I made a class and each object of the clas...
[15 replies] Last: Thank you for advice , I know soon i'll be good enough too forget abou... (by closed account SECMoG1T)
by akai09
HW HELP!
 
For example. The starting miles could be 100130.5 and the ending miles could be 101045.9. Also the hours could be 16.25 (16 hours and .25 hours (15 minutes))....
[3 replies] Last: hi you can use structure for saving time. for example struct tim... (by Rahmat)
object of a baseClass referenced to a derived class
 
what is the difference between BaseClass Base=new DerivedClass() AND BaseClass Base=new BaseClass()
[1 reply] : You probably meant BaseClass* Base The difference is that in first ... (by MiiNiPaa)
I need help writing this program (short)
 
I'm new to programming, i'm getting the hang of it, but my teacher gives a lot of confusing math problems. I just can't figure out how to do this for the life ...
[4 replies] Last: thanks (by closed account 92w05Di1)
by BC300
Output Problem
 
Hello. Can someone explain to me recursion in very lame terms? I'm suppose to write a program that generates a pattern like this: Write a recursive func...
[4 replies] Last: A tutor helped me with my assignment, but the diamond outputs wrong an... (by BC300)
by cGuru
While Loop Issue
 
My program needs to: (A) Read 2 names from a file (For each name, there are 5 scores) (B) Omit the lowest/highest scores (C) Find the average of the 3 sco...
[3 replies] Last: Thanks guys, I figured it out. I figured out that the positioning of l... (by cGuru)
Stuck on this assignment.
 
I'm almost done with this assignment. All I need to do is to the calculate the average test score for each student given by a file. I also have to display their...
[9 replies] Last: Thanks for your help. Now all I need to do is display the grade which ... (by deathslice)
by HelenI
Else without previous if
 
I'm trying to find the average and it says that p must not be g>=5 or g<=5 and i get the error ...... else without a previous if...please help #include<ios...
[4 replies] Last: thanks ... it works !! :) (by HelenI)
>= and <= operator bug?
 
In the code bellow the >= and the <= operators not working well in the range of 0.04 - 2.00, but working fine otherwise. For exampple if I put in number 2 and t...
[2 replies] Last: Thank you so much! (by vandordeak)
Still don't understand Templates.
 
I've seen tutorials, I've read books, and I still don't understand what a template is. I know it's to accept all variable types but I don't know how to implemen...
[5 replies] Last: Excellent explanation, Disch. (by megatron 0)
by akai09
question?
 
hey guys i need help with this question. can anyone please help me? question is: Can you figure out why the variables ended up with the values displayed? ...
[2 replies] Last: What is wrong with them? Do you mean the name being "ohn" and not "jo... (by megatron 0)
prompts running together question
 
if i input u1776alex 12.9 on the first prompt, why do the rest of them run simultaneously and distributes the values into the variables? cout << "Please ...
[2 replies] Last: ok thanks (by LATCH100)
Working with multiple instances of a constructor (creating a game of dominos)
 
So im trying to create a game of dominos which includes generating 91 tiles and showing the longest chain of dominos that can be played. The tiles contain a nu...
[5 replies] Last: You can remove already taken elements from allDominos, or simply shuff... (by MiiNiPaa)
private vector intializer
 
Hi there, is it possible to intialize a private container members Such as a vector in a class. Example class intial { Public: ...
[9 replies] Last: Wow wow ! Exactly, how the hell didn't I see that? Yeah I errorneousl... (by closed account SECMoG1T)
Arrays and booleans?
 
Hey guys. I am looking for method which makes a boolean function return true when an 2d has been evaluated. The boolean function looks like this bool mani...
[2 replies] Last: This function changes the value all values in a given distance in a 2... (by DrJones)
by drawar
Create and maintain shared objects among containers
 
Hi, let's say I already have 2 class BusStop and BusService implemented as follows: class BusStop { private: string roadName; string busStopNumber; public:...
[3 replies] Last: Check if stop already exist in list before adding it. (by MiiNiPaa)
Assignment: Function for storing sequence in array
 
Hello! (Using windows, codeblocks, c++) I'm trying to make a program to do following! Make functions for: //1. Ask user for sequence lenght: 0 <= k <= 300 V...
[12 replies] Last: read chapter 7 here: https://drive.google.com/file/d/0B24Ki1Y3V2tzRnIw... (by anup30)
by davez
why getline is not working on string array
 
string yow ; getline(cin,yow ); cout<<yow; why is it not working?
[14 replies] Last: cout is demanding to be more specific string yow ; getline(cin... (by anup30)
help me in my game
 
i have two problems , first, its not putting X or O on the board. second, notice when you play it. it takes 2 enter before the next player turn. i mean , examp...
[3 replies] Last: its fix now . finally all is left is rules and the board's grid when t... (by xenovia12)
October 2014 Pages: 1... 6162636465... 70
  Archived months: [sep2014] [nov2014]

This is an archived page. To post a new message, go to the current page.