Search Results

Showing results 1 to 38 of 38
Search took 0.01 seconds.
Search: Posts Made By: joshmo
Forum: C++ Aug 15th, 2008
Replies: 3
Views: 511
Posted By joshmo
The function declaration should be identical to the function definition exept that you do not need to put a semi colon after the function definition. Another easier way to do it is to put the main at...
Forum: C++ Jul 29th, 2008
Replies: 3
Solved: C to C++
Views: 438
Posted By joshmo
First of all use code tags. Second do not use void main..main has to always return something. Then, what is the program supposed to do and what dont you understand about scanf..what kind of errors...
Forum: C++ Jul 29th, 2008
Replies: 5
Views: 593
Posted By joshmo
It looks like you have declared an array of 25 rows and 10 columns. I'd suggest you intialize the rows to their value(rows=25) and columns (cols=10). Try my example

for (i=0; i<=rows; i++)
...
Forum: C Jul 24th, 2008
Replies: 15
Views: 1,408
Posted By joshmo
There could be a possibility that if "GetInteger" is a function it is not of integer type. Otherwise if "GetInteger" is not a function then it is not declared :)
Forum: C++ Jul 7th, 2008
Replies: 13
Solved: help formatting
Views: 1,036
Posted By joshmo
What kind of problem are u experiencing with setw()? Did you add the header file "iomanip"?
Forum: C++ Jun 27th, 2008
Replies: 9
Solved: Assignment help
Views: 641
Posted By joshmo
I think your getting no output because you are overwriting the data in the array names[]. You want to assign the values of name[] to namesMore[]. Change your assignment statement to something like...
Forum: C++ Jun 27th, 2008
Replies: 9
Solved: Assignment help
Views: 641
Posted By joshmo
If you want to assign the values of one array to another maybe you can do something like this

for(int i=0;i<max;i++)
{
array2[i]=array1[i];
}
Forum: C++ Jun 22nd, 2008
Replies: 10
Views: 851
Posted By joshmo
You may need to change the while loop to a do-while loop. To keep count of your plays, you need to add a counter wherever you need an increment i.e whenever the user plays the rock you do something...
Forum: C++ Jun 21st, 2008
Replies: 3
Views: 1,883
Posted By joshmo
Yes. you can read more about it here http://www.cplusplus.com/reference/clibrary/cstdio/getc.html
Forum: C++ Jun 20th, 2008
Replies: 5
Views: 787
Posted By joshmo
You can still check the empty project option but under the project you add a new source file to the project
Forum: C++ Jun 18th, 2008
Replies: 6
Views: 1,029
Posted By joshmo
AcientDragons's code seems to be working fine. You need to include the header files "string" and "sstream" to . You need to change a little bit of the code by just adding this std::stringstream...
Forum: C++ Jun 17th, 2008
Replies: 5
Views: 761
Posted By joshmo
You have initialized b to 10 and your do while loop will keep going until 0 is reached. I would suggest you prompt the user to continue then you code the loop like this

do
{

//code here
...
Forum: C++ Jun 10th, 2008
Replies: 13
Solved: Please Help
Views: 934
Posted By joshmo
well the fact that someone can copy a code from somewhere, call it his, then someone else gets the same code from the original cheat...and so on..it is frustrating and really disapointing but the...
Forum: C++ Jun 10th, 2008
Replies: 13
Solved: Please Help
Views: 934
Posted By joshmo
All the time I open this thread it just puts a smile on my face..but I have just laughed my ass off after some of the previous posts :)
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
I used 4 since you implied that only 4 data will be needed..anyway you can declare a constant size for the array that can be changed. you can put this in your program. but remember it should be a...
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
>>I'm really not sure how to do the arrays and please correct my mistakes..

Looks like you need a 2D array. do something like this

int array[row][col];
int i,j;
...
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
you can insert another funcion or you can insert that after the withdrawal is made
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
then you need something like this.you need to do this after the withdrawal has been made and not before

double interest=0;
interest=(0.05)*deposit; //or
interest=((5/100))*deposit;
...
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
No. you can do something like this

employeeArray[]="the string";

or you initialize the elements of the array to 0..this has to be in integer type or double

employeeArray[]={0};

...
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
for your second post, how would you expect to calculate the interest rate if you dont know how it is done i.e is it 5% of the balance per month, 5% of the balance after each withdrawal,etc..you need...
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
well to implement your arrays you need a for loop and you need to initialize the arrays. I presume you want an array of names and one for the salary. Then you may need something lilke this

string...
Forum: C++ Jun 8th, 2008
Replies: 17
Views: 1,372
Posted By joshmo
is your second post related to the first post? if not, why not finish up the first problem then move on to the next. if yes then its a little confusing and therefore you should state your problem...
Forum: C++ May 25th, 2008
Replies: 9
Views: 910
Posted By joshmo
you already have a simple pseudo that is really straight forward


-propmpt user...
-accept input.
-if ....
do...(can be call function)
-else if ....
do....(can be call function)
Forum: C++ May 17th, 2008
Replies: 1
Views: 1,586
Posted By joshmo
replace line 11 with this

cin.getline(text,20)


hope that helps
Forum: C++ May 10th, 2008
Replies: 11
Views: 1,041
Posted By joshmo
have you tried replacing the "int" with "studentType"
Forum: C++ May 10th, 2008
Replies: 11
Views: 1,041
Posted By joshmo
your not making max an array...your assigning the value in "person[0]" to max..the logic is supposed to be you assume the 0th element is the highest hence the

max=person[0];


did you try...
Forum: C++ May 10th, 2008
Replies: 11
Views: 1,041
Posted By joshmo
you are outputing the array position by using max..change line 93 to something like this

int max = person[0];


you need to also change from line 95

for (int r = 1; r < numStudents; r++)
...
Forum: C++ May 10th, 2008
Replies: 11
Views: 1,041
Posted By joshmo
please use code tags so as to make your code look readable...in you code i noticed a mistake that reads into a file u need this


inFile>> /*contents*/
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
if your header file is called header1.h then you can do this

#ifndef header1_H_INCLUDED
#define header1_H_INCLUDED

#include <iostream>
#include <iomanip>
#include <fstream>
#include...
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
i dont know what the program is suposed to do but the output looks okay..can u try doing what i indicated in my last post
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
i think you need to put header guards in your header file


#ifndef /*your header file name*/_H_INCLUDED
#define /*your header file name*/_H_INCLUDED
//what is contained in the header file
...
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
look at the edit features where you create you post
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
am finding it hard to read ur code..can u re post it using code tags
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
your compiler settings may have been change to not recognize syntax errors or ignore warnings..so when you build your program it cannot go anywhere until the errors have been fixed....can you repost...
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
you should change line 23

const double CHARGE = 10;
const double ATMFEE = 2;


your GetData function definition has got no variables referenced but you are calling it with variables..change...
Forum: C++ May 9th, 2008
Replies: 19
Views: 1,392
Posted By joshmo
could you elaborate more on your problem
Forum: C++ May 4th, 2008
Replies: 7
Views: 633
Posted By joshmo
so far i can see the following mistakes...when you are calling functions you dont put the whole function definition..
also you need to declare all the functions before defining them.


int...
Forum: C++ Apr 27th, 2008
Replies: 26
Views: 2,110
Posted By joshmo
it looks like you are prompting for 6digits and you specified that the requirement is to get a whole number...then change your input to get the number as a whole

cin>>number;


your for loop...
Showing results 1 to 38 of 38

 


About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC