I'm having difficulty to understand that.
You say to use map<char,bool> but in the code presented it says man<char,bool> what does man stand for?
"
map_name_you_use" is this a name that I come...
Type: Posts; User: hencherz
I'm having difficulty to understand that.
You say to use map<char,bool> but in the code presented it says man<char,bool> what does man stand for?
"
map_name_you_use" is this a name that I come...
Since its an actual assignment I won't be able to post all of it, I hope you understand..
This is the actual part that I can't move from. There isn't a way that I know of to go back to the _'s to...
Hello again,
I am trying to design a hangman game but I'm having an issue with trying to get to the next step from where I am.
So far I am able to generate random words, get the program to...
I've created a for loop that will loop for every single character the user has entered.
Lets say if the user has entered the word test, it will loop 3 times (just realised I should perhaps do a <=...
Fixed, but I still get 0% for each character..
Thanks, but what does while(1) actually do here?
I'm trying to work out the percentage of each letter in a string typed in by the user, it should display all characters followed by the % which will be worked out by the length of the string
...
Thank you very much, it worked. :)
Another quick question. What if I wanted to make the program restart, is there any way I can call main again instead of it quitting on me. i.e.
if (z ==...
do {
// carry out tasks
} while (!isupper(string));
The address of Z? How do I go about doing that?
Do I need to declare a [0][0] or something?
A simple program that asks the user to enter a or b, if a is entered, some text is displayed, and if b is entered then the program exits.
#include <stdio.h>
int main()
{
char z;
I have created a program where by a user inputs a set of upper case characters and then the program carries out a set of tasks based on the input.
What I'd like to know is how do I implement a do...
double array[5][2] = {{0, 4320.55}, {0, 32.77}, {0, 561.52}, {0,243.57}, {0,5479.16}};
string cities[5] = {"NewYork", "Westbury", "NewJersey", "England", "Miami"}
After reading the above...
I see what you mean, I just put in one of the vowels and the output incremented accordingly.
I changed the double quotes to single but the compiler begins throwing errors at me..
I know in C...
Thank you all for your suggestions.
double array[5][2] = {[0][4320.55], [0][32.77], [0][561.52], [0][243.57], [0][5479.16]};
string cities[5] = {"Newyork", "Westbury", "Newjersey", "England",...
Sorry, got a mix up there, it is fixed now.
I am coding it so that it accepts lower case vowels only at the moment, I can change that later but its good to go for the moment. :)
@laserlight, here is my current code:
#include...
I now have a working code. :)
Problem is when I output the incremented array (its supposed to increment) I'm being told that all the vowels have occured 0 times when this is not the case?
I've...
I want to be able to store distances between cities using C++, and store these distances using an array of 2D double (data type). I then want to ask the user to enter two of these cities and output...
This is just a small fragment of my code so I didn't include all the vowels.
string response;
int array [5]= {0, 0, 0, 0, 0};
cout << "enter a string of text\n" << endl;
...
Thanks! That fixed it, another thing I've learnt now. :)
I've gone and implemented the code to update all counters of the alphabet, however all I've done now is print out the number assigned to...
Thanks all, the data type change did sort the problem out after all.. I'm now trying to print out the occurrence of a char typed in to the string..
(I've spent some time trying to accomplish this...
First post on this website, I'm a newbie to C Programming. I've got my head around data types.
I want to be able to ask the user to input a string of text and store it in an array. I have created...