General C++ Programming - October 2010

Multidiminsional arrays
 
Begin by writing a function named countScores to accept the list of scores and return an array of on...
[2 replies] Last: I tried changing the < at line 71 and using counts in the void writeHi... (by wassabi)
Median formula problem
 
hello , i want a formula for calculating the median of an even array
[10 replies] Last: Just for the notice, although his code is nice, the ternary operator j... (by Kyon)
Best way to extract floating point numbers from a text file
 
Hi, I have a text file and I am looking to extract the floating point numbers from that file, there ...
[5 replies] Last: Then you probably want fscanf(): http://www.cplusplus.com/reference/cl... (by Galik)
singleton pattern
 
I've heard many people say the singleton pattern is evil. In my games I make my visualisation class ...
[1 reply] : Singletons are evil for all the same reasons globals are evil. Any co... (by Disch)
by Xoric
DirectX9 Shader - General Question
 
Hello everybody, I hope this is the right board to post in. I'm programming a game in C++ and Dir...
[no replies]
C++ Write to file but no overwrite
 
I've already read " http://www.cplusplus.com/doc/tutorial/files/ ", maybe I didn't look close enough...
[2 replies] Last: Ah! I see! As always Albatross to the rescue. Thank you so much!! (by LittleQuick)
by suds
returning a letter from score totals
 
I'm trying to creat a function that will take the score input and give the output in a letter grade...
[2 replies] Last: // Just something for no reason. #include <iostream> #include <ccty... (by thediamondsaint)
Why won't the window appear?
 
I made a class and a few functions to simplify winapi programming, but after I added it to the code,...
[2 replies] Last: Oh, derr. Thanks! (by PiMaster)
odd number -> even number in an array
 
This is a homework, so I will not ask for the full code, I need a part of it. I need a working code ...
[1 reply] : You're always checking the last value in the array and the one after t... (by Athar)
Find length of floating point numbers
 
I need some help on how to find the number of digits in float/double numbers. Can anyone suggest a s...
[1 reply] : Floating point numbers are stored with a weird format in binary. When... (by Bazzy)
by Hiner
How to check type of Handles?
 
I have 2 ref classes. I want to make some code to check the type of handles, not pointers. For p...
[2 replies] Last: I mean handles to managed objects. I know how to check types of point... (by Hiner)
by tomato
C++ operator overloading problem
 
I want to do some fraction operation,my code has no error but can't run. who can help me correct it...
[2 replies] Last: thank you very much,I got it.. (by tomato)
finding mode without pointers
 
hello , i want to ask is there any function that gets the mode of an array without using pointers ??...
[6 replies] Last: [quote=Juan Soulie]I recommend the reading of the chapter about Pointe... (by Albatross)
Using if_ndef with cpp files
 
So I have this class in main that I want to use in another file Square.cpp. However, I include Squar...
[4 replies] Last: Thanks devacool420 (by dunsondog109)
by nquadr
Coding Question
 
Write the code for a method named calculateTax that accepts a double parameter named subTotal and a ...
[3 replies] Last: #include<iostream> using namespace std; void calculateTax(doub... (by nquadr)
using an object of a template class as a parameter
 
Hi, I've written a template class: template <typename T> class example { public: ...
[1 reply] : The only idea i had was to overload the function with any possible da... (by ne555)
How to set a pointer to an object in set?
 
Hello all! I have a std::set<Sense> all_synsets; defined in my main procedure. Afterwards I wan...
[7 replies] Last: The & is the 'address-of' operator, as in "what is the address of n... (by Duthomhas)
Erray Expander
 
I am having difficulties with a program I have written.My program will compile, however, it does not...
[10 replies] Last: Thank you for pointing that out to me. I think I am going crazy lol. I... (by TayKaye)
Associative containers and Two comparison Functions
 
Hi Item 19 of effective STL advices us to learn the difference between the equivalence and equality ...
[1 reply] : The problem is that it would mess with the container's ability to do w... (by Duthomhas)
Parallel Array reading and bubble sorting
 
I am having trouble initializing some parallel arrays using an input file. I am only able to get th...
[no replies]
October 2010 Pages: 123... 23
  Archived months: [sep2010] [nov2010]

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