No one has voted on any posts yet. Votes from other community members are used to determine a member's reputation amongst their peers.
13 Posted Topics
I'm used to if/else. Can someone tell me if this correct or not. It's not pulling up an error but it's not outputting what I want it to output either. Thank you! char pick; cin >> pick; if(pick == 'a' || pick == 'A') stuff inside here //For case switch... … | |
I will be posting bits and pieces of my code that is relevant. //Function Prototype int binarySearch(char*); // Binary search of dictionary. the Function I'm passing to. char* reverseTruncateCipher[80]; <---- variable I'm passing. /*I have these variables stored in them reverseTruncateCipher[0] = all reverseTruncateCipher[1] = generalizations reverseTruncateCipher[2] = are reverseTruncateCipher[3] … | |
I'm trying to think of a way to compare a string of multiple words and take each individual word to a dictionary. I have a binary search already coded but it's just breaking the string apart I'm having trouble with. I have to use C-Style Strings (character arrays). For instance … | |
Basically this function is supposed to accept a user inputted string, and the amount it is supposed to be transposed by 'x' amount (between 0-25). The idea behind transposition is that if the user enters "abc" for the string and then wants to transpose it by 1. The new string … | |
How do you do that? This code reads in the book. It reads in fine. Now I just have to alter it so it doesn't read in repeat words in the book. How would I do that? void readInStory(){ ifstream inStream; // declare an input stream for my use int … | |
I've tried cin >> userInput; and it stops reading the word after it hits a space. but then I tried cin.get and it just skips all the other cins. Then I tried cin.getline and it skips over the userInput cin and goes right to the next cin (cin >> direction). … | |
For instance... say that I set char a = 'a' char b = 'b' how would I combine them to make them "ab" using strcat? | |
Basically I'm trying to see if the first letter is in the dictionary... then if it is.. check if the first and second letter are in the dictionary.. and if it is... check if the first, second, and third letter are in the dictionary... and so on and so forth. … | |
How do I combine two c-style strings together? Basically I'm trying to see if the first letter is in the dictionary... then if it is.. check if the first and second letter are in the dictionary.. and if it is... check if the first, second, and third letter are in … | |
For instance, shouldn't the following code work if I wanted to pass an element of a 2d array? if not what would be the best way to do it? Thank you! #include <iostream> using namespace std; void randomProgram(char random[][]){ random code inside of here; } int main(){ char letters[6][6] = … | |
Re: Write a program in C++ to play a mind-reader game sometimes called "Russian Magic Square". Your interface will be text-driven using numbers and letters of the alphabet and will not use graphics. Running your program will look something like what is shown below, where user input is shown in bold: … | |
Basically my assignment is create the best Boggle board. Basically so far I've successfully created a randomly generated board, read in the dictionary, allocated dynamic memory for the dictionary, counted the frequency of each letter (for example 'a' has x amount of characters in the dictionary), and found the percentage … | |
I'm in an introductory CS course and our task is to build the best ideal boggle board (one that would get you the most points). We are allowed to use arrays, c-strings, and reference parameters (no structs/pointers since we are just starting to learn about those). Step one: I built … |
The End.