Beginners - April 2014 (Page 38)

How do I sort a an array?
 
I have these codes. I need to sort this array to find the average, mean, and mode. int NumberofStudents; do{ cout << "How many students were su...
[9 replies] Last: Ah, but if you scroll down the page a little further: (In the above... (by CodeGoggles)
Encryption
 
I am trying to xor encrypt and decrypt text using a user chosen key. The encryption step seemingly works fine but when i try to decrypt it back into plain text ...
[6 replies] Last: Thanks for the help guys (by nickmiller24)
Is it possible to dynamically cast a stl::list of derived pointers to a list of base pointers?
 
I have these two lists list <PrivateShoutOut*> allPrivateShoutOutsList; list<PublicShoutOut*> allPublicShoutOutsList; PrivateShoutOut and PublicShout...
[no replies]
How to run two voids
 
I want to run two voids at once, aka multithreading, for a program that I'm making. I want to make a program that has a timer, and your supposed to cin an ans...
[2 replies] Last: ok (by bobthezealot)
Difference between Vector and Array
 
What is the difference between an array and a vector
[11 replies] Last: Thank you (by bobthezealot)
What do you use?
 
What do you use around the variable? int kill; int num ={1,2,3,4,5,6,7,8,9,10}; cin>>kill; delete num ;//what do you put around the int kill? Thanks....
[5 replies] Last: Problem solved! (by bobthezealot)
by cbufis
Functions Question
 
I am writing this program and think I am close. The only problem is the output has some funny hashtag and the highest number output is incorrect. Any advice wou...
[13 replies] Last: I just made the change to call the function with average = averageSc... (by cbufis)
Using classes and friends of classes
 
Sorry - deleted post for academic reasons, don't want teacher to think I copied my own program, lol
[7 replies] Last: I actually had just caught the error myself after posting and looking ... (by Xclusive198)
by odin39
Virtual Inheritance: "dreaded triangle problem" and shared subobjects
 
I'm trying to grasp the role of virtual inheritance in multiple inheritance and polymorphism. I have three classes: A, B, and C. A is the base of B and C. B is ...
[10 replies] Last: I realize this is a bit of an edge case, and if I could, I would avoid... (by odin39)
Problem with iterators
 
Okay so I was wondering if there is a way to return a incremented iterator but now increment it. Let me clear this up a little. So this is what I have written ...
[7 replies] Last: std::next() does exactly what he wants. Sorry I didn't read I wou... (by giblit)
Sorting numbers in an array
 
I need to sort numbers a user entered in an array from largest to smallest but from the upper and lower bound that they give, the rest of the numbers just follo...
[1 reply] : You don't specify what the compiler says, but I think the function get... (by closed account jvqpDjzh)
by toast9
pass in member arrays and comparing them
 
I'm trying to compare two arrays and check if they equal each other at any point in their arrays. Each array is from a different class. I get the error: invalid...
[8 replies] Last: What about something like this: ? #include <cstdio> using namesp... (by AbstractionAnon)
by Havel
Blank screen with only blinking cursor
 
Can anyone see why the code below would not print anything to the screen? donations.txt is a text file with double values each on their own line. donations....
[6 replies] Last: I typed the numbers into the txt file like you did instead of copy pas... (by Havel)
display simple queue list
 
im having problem with the output ============== front->12->1>-1813->1813 ->12 ============== where the things at the back shout not be display as the user...
[1 reply] : You are not making use of your queue's internals to display the list. ... (by Smac89)
no matching constructor for initialization
 
Hi, i am writing my first C++ in pop syle, so please go easy on me, but i get an error when compelling this code below: no matching constructor for initialisati...
[2 replies] Last: Ok awesome, that makes sense. Thanks very much (by mcoliver88)
Finding the largest value
 
Alright, I'm trying to find the largest value through a set of numbers that the user enters. I've googled how to and looked through the forums but I don't under...
[4 replies] Last: Well you shouldn't use magic numbers like 10. You should assign it to ... (by giblit)
HEARTBLEED BUG
 
hey guys,does any body know the line of source code which caused the bug? i have tried researching this but cannot seem to find it thanks
[no replies]
Displaying Points
 
Im still a bit new to pointers and structs, and i dont understand why my display points function isnt working. Im thinking what im returning in readPoints isnt ...
[7 replies] Last: You will need a comparsion function which will return if first point i... (by MiiNiPaa)
vector.size() givinig unexpected results with array indexing
 
Write your question here. #include <iostream> using namespace std; #include <vector> int main(){ vector<int> vec1; vec1.push_back(0); vec1 = 0; vec1 = 1;...
[4 replies] Last: [quote=zaqwsx170]So yeah. vector.size() is apparently not giving me co... (by cire)
by misc
c++
 
Design and code a program that asks the user how many numbers from which to determine an average. Then prompt the user for the integer values and sum them to a ...
[1 reply] : ??? Are you just asking people to do your homework for you? (by zaqwsx170)
April 2014 Pages: 1... 3637383940... 67
  Archived months: [mar2014] [may2014]

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