Beginners - November 2016 (Page 31)

Output is always zero
 
The output for my "biggest" (Line 45) and "median"(Line 78) functions always returns zero. Could someone point me in the right direction? #include <iostre...
[1 reply] : Firstly, do you understand you have to input 100 numbers? Have you c... (by tandoro)
Class object array being cleared/reset
 
I have the following class in a .hpp file. That file in included in all my .cpp files, two of which use this class. static class Player { public: ...
[2 replies] Last: Hmm alright. That's interesting. Thanks! (by caesiumx305)
Function comparison
 
Probably a very easy question but why the first function works (gives correct output) meanwhile the second does not? char complement(char c) { if (c == 'A')...
[2 replies] Last: Thanks (by Oriol Serrabassa)
Detecting StartUp/PC StartUp
 
So is there a way to make the program detect if the PC has just started up or when the app has just started up something different than the original time? EG: ...
[2 replies] Last: https://msdn.microsoft.com/en-us/library/windows/desktop/ms724411(v=vs... (by integralfx)
by akron1
Finding Median of an Array
 
case 'M': case 'm': int j; int size; double average, median; if(i == 0) { cout << "E...
[9 replies] Last: In the PM, you suffer from the same problem you do in the code you pos... (by cire)
by NateE
Need Help with C++ calculate hr/rt/wk/mo/gross pay
 
Been in class for two weeks. I am not sure what to do next. I think I need a for loop. Can anyone help me out if that is what I need and how I would do it? C++...
[2 replies] Last: This is what I have running errors. #include <iostream> /... (by NateE)
How Could I Reallocate An Array Of Pointers So That Its Size Is Bigger
 
How Could I Reallocate An Array Of Pointers So That Its Size Is Bigger? I have a class which initialises an array of pointers however I wish for their size t...
[1 reply] : Store you pointers in a container like std::vector<Node*> - this is a ... (by gunnerfunner)
Storing Array into Vector Class
 
Hello! I need some help writing a class that allows me to store an array into a class that uses Vectors as the underlying structure. I am having trouble in s...
[1 reply] : // contructor -> actually a normal member function void setnames( s... (by integralfx)
Requesting help with weird problem in code
 
Hi, I would like to know if I would be able to get help with a problem that I am having with my code. I am getting a 'string subscript out of range' error and I...
[1 reply] : The only thing I can see that can cause this is: if (key == respons... (by integralfx)
im very confused and would like some help with files
 
So I have this homework that is due and I really have no idea how to go about doing this. Ideally some links to explaining what to do would be the most helpful ...
[9 replies] Last: Your welcome. fileName is a string to store the name of the file th... (by boost lexical cast)
Handling certain cases [Help]
 
The program has no problem adding,subtracting or doing scalar multiplication as long as variable a and b are there but, if I want to add ex: 2+4i with 2 , then ...
[1 reply] : I'm not sure if you meant representing a number as 2+4i - Matlab can d... (by lastchance)
Decision making program - problem
 
Hello, This program is supposed to calculate the surface/perimeter of a triangle. (too lazy to add the function for surface lol, I did this code only for the d...
[4 replies] Last: forta2K, as AbstractionAnon said, you don't need the bool for this e... (by longberns)
Error help
 
On line 5 I am receiving the error "assignment of function void sum(int*). Could someone explain why that is the case? void sum(int testArray ) { f...
[1 reply] : sum is the name of your function. You can't use that for a local varia... (by lastchance)
by Kbhess
Need help, can't get program to run
 
I have been working on this code for awhile. Each time I fix an issue more appear. Can anyone help me figure out what I am doing wrong? My output is to reflect...
[7 replies] Last: @Kbhess, you don't need a loop for this exercise #include <iostrea... (by longberns)
by akron1
Test array to see if it is empty. (1,2)
 
I need help with my array if it is empty it is supposed to display the words error. Can someone lead me in the correct direction. case 'A': case 'a': sum = 0...
[23 replies] Last: I am now having trouble finding the median: Here is what I have so fa... (by akron1)
please help! - pig dice game c++
 
Hello! So for an assignment, we have to write a program for the pig dice game. You are to finish the program below that implements the dice game PIG played ...
[2 replies] Last: Sorry, I didnt know that this one went through when I tried posting it... (by student2019)
Bubble sort fix
 
Will someone please take a look at this and give me an idea of why my sort function isn't working? My assignment is already past due but at this point I really ...
[4 replies] Last: Update: I have updated what i have added to the code and where i am at... (by NavyVetSafIn)
uppercase to lower
 
What's wrong with this simple line of code cout<<("%c","a"-32)<<endl;
[4 replies] Last: thank you (by zeroblank)
global arrays
 
I originally had my arrays in my function so i was losing all the data from the arrays moving on to the next function leaving me stuck for days. after staying u...
[4 replies] Last: sorry. I just got on this site this last week. still getting the navig... (by NavyVetSafIn)
by SPIR
My program kind of works, kind of doesn't
 
ppp
[4 replies] Last: Alright cool. If you replace char answer with int answer then the whil... (by rghrist23)
November 2016 Pages: 1... 2930313233... 44
  Archived months: [oct2016] [dec2016]

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