General C++ Programming - July 2014 (Page 17)

Problem in classes
 
Hey i am making a multiple quiz program. so everything is working fine, except for the part where i'm trying to add a highscore for each user which is being s...
[1 reply] : > so everything is working fine, except for the part where i'm trying ... (by ne555)
C++ Map storing multiple data types
 
Dear C++ Users, I am trying to create a generic map container which shell contain data of different datatypes. I already found a solution in this forum here:...
[4 replies] Last: No, I wanted to prevent dynamic_casts. Casting in general I want to be... (by weissric)
Calculate Standard Deviation in C++?
 
I have a program that will calculate max, average, etc from a file of numbers. However, I cannot get it to calculate standard deviation. Please advise. #incl...
[4 replies] Last: - read your numbers into an array (A) - calculate the average (B) - it... (by mutexe)
I need help (exceptions: throw, try, catch)
 
#include <iostream> // For cin, cout, endl, etc. #include <iomanip> // Output formatting #include <cstdlib> // Standard library #include <string> ...
[2 replies] Last: You have the right idea with your badHour and badSeconds functions, ho... (by AbstractionAnon)
problem with 'ostream'
 
Hello everyone, i'm trying to overload operator<< for a class Complexe so i tried this; ostream& operator<<(ostream& sortie, Complexe const& z) { sort...
[2 replies] Last: Thank u soo much, it worked. (by whiteReve)
class with header
 
this is a small program..but get so many errors...please anybody help me. //person.h class person { private: int ID; char fname ; char lname ; c...
[2 replies] Last: //person.cpp lines 15 and 21, remove the semicolon ; at the end of th... (by wildblue)
If statments
 
Hi, I am into my 2nd week of my computer programming class and my professor assigned us a lab. It has to do with property tax and there can be two ways to ca...
[1 reply] : For your input, what are you storing it in? The easiest would be if yo... (by TwilightSpectre)
clearing cin buffer
 
I am having some issue with clearing cin buffer. The following code does not wait for me to see the output window and till I hit return character. #include "i...
[3 replies] Last: Thanks Duoas and ne555, that was helpful. (by funprogrammer)
infinite loop
 
cout<<"Please enter the number of disks <max 9>: "; cin >>d; while (d < 0 || d >= 10){ cout<<"Positive integers <max 9> only, please!: "; cin>>d; } So,...
[3 replies] Last: Thank you so much Smac89! (by Stephanie)
HELP with functions in my program
 
This is my assignment: •Before reading the scores in and displaying, print a header (example is in purple in the image below). •Create a showScore() fu...
[2 replies] Last: Yes that is exactly what I need. Thank you for the input. Its just set... (by howellj8)
Converting SYSTEMTIME to time_t?
 
I am having trouble converting SYSTEMTIME to time_t Can anyone help me with this situation please?
[10 replies] Last: thanks (by danielmccarthy)
Should I delete every node in the linked list?
 
Hi again, Still toying with my self-coded linked list class and now another question: should I delete each node of my class with the delete in the class de...
[4 replies] Last: Fair enough. The point is, make sure your code closes cleanly :) (by ResidentBiscuit)
Recursive to Iterative
 
map< int, int > cache; int count( int n ){ if( cache != 0 ){ return cache ; } if( n == 1 ) return 1; if( n % 2 == 1 ) cache =...
[7 replies] Last: > I cannot use recursive b/c the stack would be to deep and causes SEG... (by ne555)
difficulty with converting numbers
 
I've thrown together the code in my latest post, which is the program for this assignment: In this project you are going to use single dimensional array an...
[7 replies] Last: Modding and dividing by 2 is for converting decimal to binary. It a... (by wildblue)
How to overload the [] operator twice?
 
Hello guys, Here's my question. I'm coding a basic Linked List class (for the purpose of understanding and having fun, I know about STL), LList . I have ...
[3 replies] Last: Wow, that's really cool! Thank you, Peter87! It didn't, because I did... (by alekscooper)
Undesired output in program
 
I am trying to create a program which will output all possibilities of a set of variables (number of which is set by user), and a range of different integer pos...
[no replies]
Function works when passed string literal, but not a variable
 
I'm making a .json loader for a project that I'm working on, and to simplify things, I decided to make all the root attributes named in a separate file. Here's ...
[3 replies] Last: Thanks Peter87, I changed the const char* s to std::string s, and it... (by FalterrisAunvre)
c++ game programming
 
I want to make games in c++ but do not know what is the best option is. I am using code::Blocks on windows. I know there is visual studio express or add-ons to ...
[18 replies] Last: I had to do a couple other things first but that did help Thank you f... (by Tyler151)
by q139
How to delay part of code
 
for example i have int count = t1; while(count>counter){ Sleep(delay); Int32::TryParse(textBox2->Text,add); result = result + add; counter = counter ...
[8 replies] Last: You make it sound like learning a GUI library is this big endeavor, u... (by closed account 10X9216C)
getting the day of the week
 
Hello all just started an account. I have a fun question that is an end of an inherited class. I am trying to return the day of the week using time structures. ...
[2 replies] Last: // And this? i'm guessing month in that library is zero-based. I kn... (by mutexe)
July 2014 Pages: 1... 1516171819... 26
  Archived months: [jun2014] [aug2014]

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