Beginners - May 2015 (Page 28)

matching game: keeping matches visible
 
Win32 console text based matching game: I have a somewhat working matching game, but I have a few ?'s: Is there a way to shuffle a 2d array randomly each ...
[2 replies] Last: Still not it completely, but beautiful code... that was a better shuff... (by breich2)
Candidate Program
 
This is what i have so far, but i am not too sure how to input the percentage of the total votes received by the candidate. Here is the assignment Write a prog...
[5 replies] Last: Well you know how to itterate through the array, its pretty much the s... (by LendraDwi)
Need Help about code confusion
 
Hi, I had a question about the following code from the website. My question was that why do we use the first complex code and not the simpler code, number 2 bel...
[1 reply] : getline() is just an embedded function. It has it's uses. but really ... (by nadurraXII)
Need Help with Basic Calculator
 
Hi, Im new to programming C++, just started to self learn it recently. I was trying to create a basic calculator but when I add cin.get() in the end, it closes...
[5 replies] Last: If you are using visual studio 2013... you want to "start without debu... (by nadurraXII)
Calling overloaded operator from class
 
Hello all! I have a simple class of Vector (just doing it for learning purposes) and I have overloaded the operator: double& Vector::operator (int i) ...
[4 replies] Last: Nope -- C++ does not remember variable names. The names is source code... (by andywestken)
by hamkid
Applying arrays to encode a string
 
I have to modify the “encode the line” part of the following code to use a repeating sequence of numbers to scramble the letters, instead of +1 for each let...
[1 reply] : % is the modulo operator. It returns the remainder in a division betwe... (by maeriden)
Why do I need a dynamic array?
 
I'm trying to understand the need for dynamic arrays. My understanding is that this shouldn't work, but it does. Can anyone explain this to me? Thanks! ...
[2 replies] Last: Actually this "feature" didn't make it into the standard. VLA are stil... (by jlb)
Function that changes the last value of an array
 
I need help with this assignment. Write a function change that accepts an int array as the first parameter, and another int parameter for the length of that...
[1 reply] : You specified that the third parameter of 'change' is a pointer to int... (by maeriden)
cout a char after a number avoiding pressing enter
 
guys i am doing a project and this is a problem ....i wanna to cin an array with this form [1;2;3;4;5] but after i type 1 it doesn't show the ";" or "]"...
[1 reply] : Google "c++ unbuffered input" http://stackoverflow.com/questions/4218... (by maeriden)
Function that returns true if even or zero and false otherwise
 
What is wrong with my code? #include <iostream> using namespace std; int x; bool even(int x); int main() { int y; cout<<even(y); } bool even(int x) { if ...
[2 replies] Last: What do you expect the output to be? Your y variable is uninitialized.... (by Ganado)
Passing pointers to function
 
I'm having a issue with my code, it compiles and works but it skips the while loop entirely. The program uses a linked list also which I left out since my assum...
[4 replies] Last: current->next = temp; //current is now pointing to temp current->nex... (by maeriden)
Code skipping - function problem?
 
I'm trying to write a rabbit cancer sim and I am having an issue: my program stops at "starting simulation" on line 88. I looked up all of my syntax and I see n...
[3 replies] Last: Look closer at line 51 and 52 and The problem may not be syntax but... (by lukecplusplus)
by DtownC
Problem with If in Loop to produce Error
 
I need to create a program validates a code input. If the code is invalid an error should be displayed, otherwise nothing would happen. The program works with...
[6 replies] Last: Not working either and the for loop has me way worse off than I was be... (by DtownC)
by c4l
Need help with a maze game project
 
I have been working on this maze game for a while, but it seems like my maze.go function isn't working properly. #include <iostream> using namespace std; ...
[3 replies] Last: Line 12: What does return0h return if none of the cells are 0? Line ... (by AbstractionAnon)
Working on a new program
 
Hi i need help creating a program that accepts the user input as a string. It needs to count constants and vowels with two seperate void functions for them. ...
[no replies]
Why does this result in an error
 
void example (int x) { x=x+1; } Why would the following result in an error? cout<<example(7); NOTE: assume the call is part of a ...
[1 reply] : Your function return type is void that means it dont return anything (by LendraDwi)
Question about Boolean
 
Hello, I'm a beginner at C++, and I'm having trouble understanding Boolean: ( ! ( true || false) ) //This ends up false ( ! ( true || false && fal...
[3 replies] Last: Figured it out! Thanks! (by idenatin)
by radgx
chance
 
Write your question here. That's my ver yvery simple game. I wanna add some things, but i dont know how. 1.How to add a chance to do damage ? (for example 80%...
[1 reply] : 1. You can create another random int ranging 1 to 10, then multiply ... (by LendraDwi)
conversion program
 
help please. I'm trying to create a conversion program that lets the user choose a unit first then converting it to other units #include<iostream> #inclu...
[3 replies] Last: n here is float not char, try change it to char and remove some unused... (by LendraDwi)
by zxcasd
searching in a string
 
Hi everyone;i have a problem with string;i want to cin a word like microsoft,then search in it if it has word like "soft" ; if it has "soft" ;then cout the "yes...
[1 reply] : http://www.cplusplus.com/reference/string/string/find/ (by mutexe)
May 2015 Pages: 1... 2627282930... 40
  Archived months: [apr2015] [jun2015]

This is an archived page. To post a new message, go to the current page.