Posts
 
Reputation
Joined
Last Seen
0 Reputation Points
73% Quality Score
Upvotes Received
2
Posts with Upvotes
2
Upvoting Members
2
Downvotes Received
1
Posts with Downvotes
1
Downvoting Members
1
0 Endorsements
Ranked #2K
~18.2K People Reached
Favorite Forums
Favorite Tags
Member Avatar for Crutoy

Hello , i'm trying to solve a problem Tower of Hanoi recursively. I'm having problems with coming up with logic how to treat disks in terms of value. Lets say i have 3 disks how should i assign values to them ? My function is supposed to be defined such …

Member Avatar for Crutoy
0
201
Member Avatar for DaniwebOS

I'm working on a program for fun but I can't figure out my first problem, also I'm aware the program doesn't end. [CODE]#include <iostream> #include <conio.h> #include <string> using namespace std; //all prototypes void studentName(string&); //all global variables //main void main() { do{ string Name; studentName(Name); cout << "\nStudent Name: …

Member Avatar for jonsca
0
124
Member Avatar for yozzie

I am doing some code challenges from a book and am stumped on this particular challenge. I am supposed to pass an array to a function, use the function to determine the minimum, pass that value back to main and print a response varied by the returned value. The problem …

Member Avatar for yozzie
0
168
Member Avatar for beejay321

[CODE]int userChoice(){ int choice; cin>> choice; while (choice!=1 && choice!=2){ cout<<"that is not a valid choice please choose again "; cin>>choice;} return choice; }[/CODE] the whole point of this is that if a user doesnt enter 1 or 2 then it tells them to enter 1 or 2 and wont …

Member Avatar for Crutoy
0
234
Member Avatar for plang007

I can not seem to figure out how to drop the lowest score. When I run it it says the lowest score dropped was 0. How do I fix this? [CODE]#include<iostream> #include <string> #include <cmath> using namespace std ; string getName (); int averageScores( int); void printMessage (string, int); void …

Member Avatar for plang007
0
617
Member Avatar for MaDo4

Hi guys i am trying to write a program that counts the number of lowercase characters in an input file and display the two most used lowercase letters. My problem is I dont know how to get my program to count each lowercase character and save them into an array …

Member Avatar for MaDo4
0
119
Member Avatar for coolbeanbob

I can't figure out why I am getting this error. I have tried #include several things and I have tried changing the location of srand. #include <iostream.h> #include <ctime> class Horse { int position; public: Horse(); //Horse constructor??? Per UML int random; srand( time(0)); void advance(){ random = rand() % …

Member Avatar for sfuo
0
4K
Member Avatar for schrope

help i can not figure this out. my home is to encryption a four digit number I have to add 7 and use mod 10-- i think i have that part but now i need to swap the first number with the third and second with the fourth. i can …

Member Avatar for Crutoy
0
169
Member Avatar for zacblazic

Hey guys, So I today I converted my programs from VS 2005 to VS 2010. I came across an issue involving the string null terminator ('\0') in a function of mine. (Note: It worked in VS 2005). [CODE]int StrLength(string str) { int i = 0; while(str[i] != '\0') { i++; …

Member Avatar for Narue
0
138
Member Avatar for schrope

i am taking my first C++ class and i can not clear the following error can anyone help error C2447: '{' : missing function header (old-style formal list?) //christine gershen // Exercise 4.17: Encryption.cpp // Encrypts data given by user. #include <iostream> // required to perform C++ stream I/O #include …

Member Avatar for schrope
0
141
Member Avatar for biogig

so I've been trying to write this program that takes the data from a file and outputs the year the rainfall how much it is below/above the average, the average raifall and the std deviation and for some reason I get three C4552 warnings:'>': operator has no effect on three …

Member Avatar for biogig
0
862
Member Avatar for whit0851

Hello every one I'm trying to write a game that has a person guess a number between 1 and 100 hand have the computer guess that number via inputs from the user but I keep running into snags. [CODE]#include <iostream> #include <cmath> #include <cstdlib> using namespace std; int main() { …

Member Avatar for Crutoy
0
747
Member Avatar for Crutoy

Hi , i'm trying to do an exercise where the computer has to guess the random number from the range of 1-1000. Currently this is the way i have it set up as. I divide that range in half and store it in guess and then check it against the …

Member Avatar for Crutoy
0
797
Member Avatar for reemhatim

I'm doing a function that returns the index of the largest integer in the array it's an easy function.I've done it but I don't know why the output is always 10 although i want to return only the index of the largest number and here is my code: int MAX_INT(int …

Member Avatar for reemhatim
0
142
Member Avatar for InfestedLawyer

I've seen this problem a few times and I've tried what they've done. I am still not passing my Array correctly. I'm all templated up because of last files I have used for this program (Not in the code). If that could have something to do with it let me …

Member Avatar for InfestedLawyer
0
161
Member Avatar for MaDo4

Hi im trying to calculate the average of an inputfile using a 2d array. I tried to calculate the average per row and add them all together but my code gives me an average of zero. I was wondering if anyone can see what im doing wrong or a better …

Member Avatar for MaDo4
0
140
Member Avatar for joeyn

Good day! can you guys help me to have the code for this output? pleasee.. _ _ _ 1 _ _ 2 2 _ 3 3 3 4 4 4 4 thanks in advance!

Member Avatar for Akill10
0
120
Member Avatar for chamnab

i want to write some code that can input only number or only character ? plz help me ???

Member Avatar for jonsca
0
141
Member Avatar for jnick12

I need help with the //Find letterGrade function. The program works perfect with the if/else statements that are commented out, but I want to convert it to a switch statement. I did it, but it keeps saying that the variable 'grade' is being used without being initialized...Please help. [CODE]#include <iostream> …

Member Avatar for alaa sam
0
5K
Member Avatar for cantalope

I am very new to c++ and we cannot use any built in libraries yet for the following program. The program runs fine until I add a question at the end if the user wants to quit or not. If not the program will run again to compute the power …

Member Avatar for cantalope
0
4K
Member Avatar for diffuse

Hi all, I know you guys get a lot of questions regarding hangman game programs and I'm sorry to bog down the boards with another question regarding the game. I've combed through previous posts trying to see if my issue has been resolved and I have been unsuccessful. Here is …

Member Avatar for WaltP
0
264
Member Avatar for Crutoy

Hello, i'm reviewing the exercise from the book and trying to understand the point. Basically it creates a static array and declares uninitialized char pointer. Then it allocated memory dynamically to the same char pointer. What i don't understand why is the program using strcpy() to copy string into newly …

Member Avatar for lisaroy1
0
197
Member Avatar for Crutoy

Hello , i was doing an exercise in book which asked to draw a diamond shape by displaying '*' using nested for loops. It took me quite a while to come up with a way to reverse the pyramid , and complete this exercise. So i was hoping some one …

Member Avatar for Crutoy
0
103
Member Avatar for Crutoy

Hi another exercise which im having problems with. In this challenge im given a four digit integer and encrypt each digit as follows. Replace each digit by the sum of that digit plus seven mod 10. Then swap 1st and 3rd digit places and 2nd with 4th. Heres what i …

Member Avatar for Crutoy
0
86
Member Avatar for Crutoy

Hello, Another exercise. In this particular problem we are given a five digit integer and program have to determine if its a Palindrome. Author states that we have to separate each digit into its own variables using % and /. I came up with solution but i don't know if …

Member Avatar for frogboy77
0
114