Beginners - September 2013 (Page 20)

help starting a game
 
Hi please help.I am given a task to make a game. The problem I always have is starting the game. I want to make Pieces which can move on a map.The first class I...
[no replies]
by garona
Help writing simple code with array
 
Please help me complete the code for this task. Thank you ! 4. Write a function that receives a string and a letter as parameters and returns the number of ...
[2 replies] Last: First go look up some functions for working with strings. Then find o... (by Gkneeus)
Overloading prefix inc. & dec. operators
 
why do you need to return *this at the next code sample: Digit& Digit::operator++() { // If our number is already at 9, wrap around to 0 if (m_nD...
[1 reply] : That's how the operator is supposed to behave. You wouldn't be able to... (by Zhuge)
by joet12
Put random values into a dynamic array!
 
Hey guys. I am doing a program which should do following: 1. Let the user decide how many numbers should be randomized. 2. Create an dynamic array with exact ...
[2 replies] Last: So that was all it took -.- I'm so sick of this shit right now xD Yea... (by joet12)
help correcting code
 
So I'm supposed to write a program that reads an amount of dollars int amount. Then the program determines how many $20 bills, $10 bills, $5 dollar bills and $1...
[3 replies] Last: ^ +1 (by Smac89)
Reading in data from a file one line at a time
 
Hello all I am trying to read in expressions from a file and print them out in postfix. I can't seem to figure out how to make it read one line print out the ex...
[2 replies] Last: It works! Thank you for your help. I will definitely use the tags in t... (by trevormoon)
loop problem
 
why when i enter for example an input n=3,and then i enter only two strings not three strings ??!! it should be at i=0 at i=1 at i=2 ...
[2 replies] Last: Mixing cin and getline can cause unforeseen issues i.e. what you are s... (by histrungalot)
for loop assistance
 
Hi, I got an assignment that I need some help with? I need to include this for loop in a program and it should excuted 10 times. I'm noy sure what the 'X' means...
[5 replies] Last: int main() { int n = 10; for (int i = 1; i <= n; i = i + 3) ... (by Mats)
by garona
help with a code
 
I need write a function that takes an array of integers and its size as parameters and fill this vector with random numbers in the range 1 to the size of the ve...
[1 reply] : To use a vector, you need to #include <vector> . I would then sugge... (by Mats)
by kay19
Using Rand with range.
 
Hello, very new to C++. I have to initialize an Array of 5000 and use the Srand & Rand, where the range would be -8191 to 8192. Let me provide what I have don...
[6 replies] Last: Appreciate the help people. Sorry about the range difference confusio... (by kay19)
Using strings in .h file
 
Why do I get an error when using string in a .h file? Error: 'string' does not name a type When I use string with the main function it works fine. But, when I...
[8 replies] Last: If you're going to use a variable for your signature, you should proba... (by andywestken)
by darqan
Stuck again :P
 
Can someone find an obvious error in this part? Any help is greatly appreciated! Thanks in advance! :) PS: U guys rock! randomPick.push_back(rand...
[no replies]
Initializer lists?
 
hello everybody i'm trying to create a simple sfml game, but got stuck in some class' concepts: this is a simplified code, in which i have 3 classes: Characte...
[4 replies] Last: oh, i understand now. thanks again :) (by Stauricus)
template class error
 
#include <iostream> #include <string> #include <map> #include <vector> #include <sstream> #include <iomanip> template <class KEY, class VALUE> class Dict{ ...
[3 replies] Last: well...that does make sense. I had to reread it a few times, but got i... (by metulburr)
Hello! / "Classes" help!
 
Hello all. Newbie here! So Im trying to learn how Visual Express works. I did very little programming before using Dev(??) compiler where all of your code was ...
[2 replies] Last: I have 3 files in my project. Under the "header files" is the "Timer.... (by Awitte58)
integers and unit cost
 
Write a program that prompts the user to enter the area of the carpet in square meters and the unit price per square meter. The values are to be read into an in...
[7 replies] Last: Like Zereo said, in your main function you will need to declare the va... (by closed account jwkNwA7f)
NEED HELP PLEASE
 
hello, everyone i have a very stupid and noob question i downloaded notepad++ plus to test my code but when i go to run he ask me to choose a file i guess i sh...
[1 reply] : You can get code::blocks and Mingw: http://www.codeblocks.org/download... (by closed account jwkNwA7f)
by Nebur
Check if a number is a multiple of 3 w/o the module operation
 
I want to code a program to check if n is a multiple of 3 basing on the property that if the sum of its didigts is a multiple of 3, then so is n. I try to re...
[16 replies] Last: Try this: #include <iostream> static constexpr int MAX = 1000000 ; ... (by JLBorges)
Identify Code
 
Hi, I found this code and trying to identify it.Can anyone tell me where this code came from and how to decipher it? PACKAGE CUSTOM (CLASS GENERAL;...
[2 replies] Last: I want to find out what code to learn to decipher this? (by Vanniekerk789)
Options and Conditions??
 
Hi, all. I'm new to the forum, and even newer to C++. I'm working on a homework assignment and I've literally been baffled by it for the past three days. I can'...
[3 replies] Last: Ha ! Thank you both so much !! I can't believe I missed something so s... (by dennyblanco)
September 2013 Pages: 1... 1819202122... 64
  Archived months: [aug2013] [oct2013]

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