Beginners - October 2016 (Page 6)

Access to Members of Classes within Classes?
 
My question boils down to how do I access a member of a class within another class, that's a member of that class? For example, in the below classes, both Grid...
[2 replies] Last: Friend relationships won't work, I've tried. However, I was able to f... (by HellfireXP)
array division problem
 
Write a complete C program that will fill an array with int values read in from the keyboard, one per line, and outputs their sum as well as all the numbers rea...
[3 replies] Last: Line 21: Why are you setting num to a? a is a left over value from ... (by AbstractionAnon)
Getting an error compiling this header
 
Hey all, thanks for being here to help all us beginners! I keep getting an error stating "die.h:11:11: error: expected unqualified-id before "[" token any...
[3 replies] Last: including a "cast" or "die" class. I see no cast or die class. Ot... (by AbstractionAnon)
by osur
Class Inheritance / Constructor
 
Hey friends, I am working on a program where I have a given class (Dictionary). I am supposed to make a concrete class (Word) which implements Dictionary. I sh...
[4 replies] Last: Line 3: Word inherits from Dictionary. When you instantiate a Word i... (by AbstractionAnon)
linked list and pointer compile error
 
I'm attempting to create a doubly linked list, and have come up with the following: #ifndef LINK_LIST_H_ #define LINK_LIST_H_ #include <utility> typedef st...
[5 replies] Last: Problems I see: linked_list.h Line 23,25,26: tail is an uninitialize... (by AbstractionAnon)
undefined reference
 
Thank you for the people who answered my first question about this damn program. I'm getting these errors now /tmp/ccwUdKkK.o: In function `main': mailOrd...
[5 replies] Last: Please do not modify your original post so that the answers don't make... (by coder777)
Balance Numbers
 
solve
[3 replies] Last: Please DON'T delete your original post after getting a solution. It m... (by MikeyBoy)
hard times with referencing pls help
 
undefined reference error in line 34 #include <iostream> #include <string> #include <vector> #include <stdlib.h> using namespace std; int Trahnsp...
[3 replies] Last: Then do that. All you need to make them the same type is... to make t... (by MikeyBoy)
Circular Shift
 
Hey everyone, I have a code written by someone else that is supposed to do a circular bitwise shift. Below I have the line of code that does that. unsig...
[9 replies] Last: Hello again, I would like to thank you all for answering so fast my ... (by BlueOctopus)
Program not functioning right.
 
I have almost completed my project the last thing I can not for the life of me figure out is why when I input 'B' into 'currentresponse99' it will not return bu...
[3 replies] Last: Please don't back-edit your original post like this - it completely br... (by lastchance)
Loop Problems
 
I am having difficulties, when I input "I" or "F" (into turnover() ) it doesn't run the "interception()" or "fumble ()" function. In addition when I input "T" i...
[1 reply] : Line 23/79/104/110: I.e. if (teamswap = 1){ needs to be if (teams... (by coder777)
How can you check if the user inputs the same char more than once in a string?
 
So say you're having the user input a string like: getline(cin,str); How could you check for if the user put in the same letter twice? For example, t...
[2 replies] Last: Thank you! (by icyflamez96)
BEGINNER!! STILL need help with the loop at the end!
 
thank you
[3 replies] Last: for( int i = 0; i < months; i++ ) { // calculate interest //... (by integralfx)
copy constructor?
 
If I wrote a constructor that used pointers to mimic a copy constructor, how do I write a copy constructor? I am using all the 4 different types but they all ma...
[1 reply] : Do you have some code? (by integralfx)
Help with counting primes from 1 to n
 
This is what I have so far but its not printing out the correct answers. I'm trying to get it to print the number of primes. The rest of my code works fine but ...
[17 replies] Last: Well, the working code is : bool isprime(unsigned long long n) { ... (by SakurasouBusters)
by mrsh
Read element in diagonal
 
I have an array 3x1: P =3; P =0; P =2; what i want is, i want to call this element as diagonal element for 3x3 matrix such as 3 0 0 0 3 0 0 0 3 ...
[4 replies] Last: Thanks!!my problem is solved!!*<insert happy face> (by mrsh)
by CTLZ
Trying to add an array or a vector of coordinates x and Y into my vector of unique pointers
 
Originally i did the adding of data through the using of x1,x2,etc.. but the requirements state that i have to create arrays or vectors to store my coordinates ...
[no replies]
Data structures program plz help
 
Assignment Description: Write a program for keeping a course list for each student in a college. Information about each student should be kept in an object th...
[3 replies] Last: I would strongly suggest not sending our local troll a private message... (by cire)
Need more efficient program (Sum of all divisors of an integer)
 
I need to make a more efficient program to sum all divisors of a number because my code exceeds time limit, however I do not know how to improve my code further...
[14 replies] Last: Sorry to make you answer those questions, I realized myself after send... (by Oriol Serrabassa)
Custom number of faces Dice:
 
Create a function that will roll a die with a custom number of faces (passed as a parameter) and return the integer result
[2 replies] Last: http://www.cplusplus.com/reference/cstdlib/rand/ (by integralfx)
October 2016 Pages: 1... 45678... 51
  Archived months: [sep2016] [nov2016]

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