Even that is proving difficult for me..numerous errors
Type: Posts; User: fallenangel
Even that is proving difficult for me..numerous errors
Yip,thats fair enough
I love bad ideas:biggrin:
Easily frustrated I guess
So on my orginal code if I were to replace the key word Cash with
int *ptr;
ptr = new int;
*ptr = 100;
so would replacing cash with *ptr work?
Ack I give up,I just don't know enough about class's and setters and getters.Gonna try and re-write my orginal code using dynamic memory
Ya I know I'm just not that familiar with classes,I find it easier it just write the program in one big main even though that completely backwards.
Anyway I'm having problems with my for loop now...
Fixed it
int cash = 100 should be just cash =100;
and my cout should read
cout << "You have " << ob.getCash() << " to spend. \n \n" ;
Silly mistakes really....can't wait to make some ore in the...
So I started off it very basic,just trying to output my cash value in my main.cpp.I know I'm doing something very stupid below but I'm not sure.
#ifndef RACE_H
#define RACE_H
class race
{
...
Well I'm meant to do is write a program using OOP principles and dynamic
memory allocation.I thought it would be easier to write the program first,then bring in classes and then use memort...
Basically I did some code for betting on horses here
here the header with the function prototypes
int assignOdds (int horse) ; // function to assign odds
int whichHorseToBetOn (void) ; //...
Ya your right in your assumption
#include <stdio.h>
#include <math.h>
int total;
int numbers;
int calculate(x,y);
int amount;
Hey guys just trying to write a simple program where I ask the user to in 2 number.
So if the user puts the 8 first and then let say 2
i print back the result 1 and 7,2 and 6,3 and 5,basically what...