Beginners - December 2011 (Page 47)

Creating Games
 
hello, I am trying to find a way to program some 2d game. I have basic knowledge of C/C++ (basic knowledge meaning to the topic of dynamic memory and classes/co...
[no replies]
Array averager
 
I'm trying to write a function that takes in an array of ints and the size of the array (another int) and return a double that is equal to the average of the ar...
[1 reply] : Your array definition is wrong. Try: int array ={78,90,56,99,88,68,92... (by rssair)
by gh24
Option Pricing Using Recursion; Please Help!!
 
Hi guys, Here is the code I am working with. This is supposed to price american asian options using recursion and a trinomial tree. The idea behind american ...
[15 replies] Last: Thanks for all your help JMJatlanta. The code has actually been right... (by gh24)
Stumped...
 
Going blind trying to find the logic error, so if anyone wants to spare a second and see if it jumps out to them... This is a stab at one of the fun exercise...
[2 replies] Last: This is what 18 years since your last C class does to you... Thanks! (by routerguy)
why does this loop never end
 
for(int i=0;i<NUMBER_OF_CARD_VALUES;i++) { if((CARD_VALUES ) == next_char) { ret...
[1 reply] : Check the value of NUMBER_OF_CARD_VALUES. If it is not a constant, it ... (by rssair)
Very confused about headers and source files!
 
I'm working on a project with several thousand lines of code, which I have split up into header files (.h), which look something like this: //myfile.h #ifn...
[11 replies] Last: Usually it's a obscure option, something like "adding" files to a "pro... (by bbgst)
by jean28
Base Convertion
 
..
[10 replies] Last: .. (by jean28)
by Slate
Function definition: Trouble with if/else statement blocks.
 
Working on this simple function and getting errors. Any help is greatly appreciated. Edit: Errors occurring on line 26. void displayCity() {//declare vari...
[5 replies] Last: You mean the compiler emit errors or the program doesn't do what you w... (by bbgst)
by sch518
Saving information
 
I have my final semester project for my C++ 1 class due next week and I have it almost perfect. There is one more big thing I need to do in it and I am not real...
[1 reply] : If I understand the question correctly, you want the user to be able t... (by emilya)
by RapidX
Pointer/array/declaration question
 
Hello everyone, When declaring pointers, are they only effective when declared in the block { } they are going to be used for only? Can't they also be global...
[6 replies] Last: Oh, one more thing: In the case of C++, it is in fact possible to have... (by helios)
"multiple definition" error
 
I have set up a simple dummy program consisting of a main.cpp file, a global.h file that declares some global variables, and then A.h and A.cpp files which de...
[3 replies] Last: That way, if you include it more than once (like you do in main.cpp an... (by bbgst)
Averaging Function
 
New to programming here. I'm trying to write an averaging program that takes in three integers and returns a double (their average). When I try to run the pro...
[4 replies] Last: That worked. Thanks so much. (by ubergosu)
Reading a file into an array.
 
I'm new to C++ and I have to read a file with test numbers into a single dimensional array. I've tried searching for it, but I only need the code that allows me...
[1 reply] : Problem solved, I found it. (by nheimbuch)
Need some help with a shuffling program
 
I need help with a shuffling program. My assignment wants me to shuffle a string from a user input. 1) the string is considered two parts: 1st half and 2nd hal...
[2 replies] Last: So far, i read the input and put it into an array and split them, and ... (by Final9mare)
function not finishing
 
void classify_parts(string& next_char, ifstream& in_stream, string card_value , string card_suit , ...
[6 replies] Last: i also have it cout messages after each of the function and the only o... (by bbathel)
by Amy269
Void functions
 
I have to create a program using three void functions and a value returning function. I have been working on this and as far as I have gotten is the code below....
[2 replies] Last: You will not need to perform any calculations in the main(), because t... (by Slate)
array sort
 
I'll say thanks in advance for any who take the time to glance at this for me. I've a very basic data import from my file: test2.dat. The import appears to ...
[no replies]
Error function template has already been defined
 
im creating a program that tests the functionality of template classes for my c++ class but i keep getting this error at the overloaded << and >> functions when...
[3 replies] Last: You should take the definitions of the istream and ostream overloads o... (by shacktar)
question about output
 
void read_player1_hand(ifstream& in_stream, string card_value , string card_suit ,string& bet, string player1_hand) { int i=0; card_value ; ...
[3 replies] Last: okay thanks (by bbathel)
December 2011 Pages: 1... 454647
  Archived months: [nov2011] [jan2012]

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