Beginners - March 2016 (Page 42)

Can someone help with this program?
 
I'm writing a program that takes an integer input as a dollar amount and the program will then tell you the fewest bills possible to get to that amount. My assi...
[2 replies] Last: Thank you! That cleared it up! (by forge019)
by ec252
Printing One Asterick in a 2D array
 
Why isn't my code working the way I want it to? I am having a problem with my code. I have to create a snake game and just right now(at the moment) I only n...
[6 replies] Last: I'm sorry, I worked on it today and it works now. I must have done som... (by ec252)
can't open file
 
need help opening files in a function #include <iostream> #include <cstdlib> #include <string> #include <fstream> using namespace std; void dis...
[1 reply] : Try "C:/MyPets.txt" with a '/' after the ':' ... (by Chervil)
Input into private class variable in class function
 
Hello everyone! I am trouble with this program. I made a class for my SFML game that manages everything. However, when I am trying to input the character name a...
[no replies]
by rain
Need help with generating random fromseed in my class
 
Hello. I am trying to write class for generating random floats. template<unsigned short seed> class PseudoRandomGenerator { public: PseudoRandomGenerato...
[2 replies] Last: Alternately: template<unsigned short seed> class PseudoRandomGenerat... (by cire)
Gaming process
 
I want to know how can i make a vedio game.... i have searched enough but cant find the way through which i can make a game.... i jst wanna know the process,too...
[1 reply] : For 2D games: You can check out the SFML library: http://www.sfml-dev... (by FireShadow)
by wotah
Need help with my code
 
}
[1 reply] : What do you think the starting value of totalCharCount should be? Zero... (by Moschops)
advice for dealing with files
 
Hi everyone, so I'm making a program that lets the user make a crossword puzzle. I have some pseudo code for the input/output. But I don't know how to handle fi...
[5 replies] Last: Yep! That's what I was thinking! (by koothkeeper)
BFS for RGB puzzle.
 
I solve RGB puzzle using BFS, it is working correctly but i need to print the route which it used to find out the solution. I am a little bad with pointers, the...
[4 replies] Last: @theturk1234 Well I didn't apply pointers anymore, I just made a stri... (by spacer15)
Multiple objects calling a function
 
Hi all, in my code below, I have 2 objects, each with "age" member data. I have a method that is supposed to add those ages and convert them to another number, ...
[6 replies] Last: No problem! (by theturk1234)
Please HELP with random numbers
 
Input a number/integer:_____ num1 = num2 = num3 = The Total is:______ Let say I input 50 num1 = 10 num2 = 15 num3 = 25 The Total is: 50 If I inpu...
[12 replies] Last: Turbo C++ is ancient. You'll want to randomize() somewhere at the be... (by Duthomhas)
Long Code with a segmentation fault
 
Sorry for the long code, but I am completely stumped with trying to get a simple Tic Tac toe game going. Once I get into the MakeAMove function, it breaks. A...
[2 replies] Last: Something looks odd around lines 26/27 and 33/34. You have both a loc... (by Chervil)
-Need Help- c++ double function
 
I'm having some trouble with this program, I'm aware I can use a vector but I'm trying to do it only using arrays. Once the program gets to the initial array si...
[3 replies] Last: void doubleArray( Information * person ) { Information * temp; *per... (by keskiverto)
[Error] Id return 1 exit status
 
// Initializing an array, filling an array and manipulating elements. //Programmer: dominologi #include <iostream> #include <cmath> using namespace std; ...
[4 replies] Last: I have no clue as to what you mean by the <>formatting button. Read... (by AbstractionAnon)
I need help to read words from a string
 
Hi, I need to read a word in a string, without using tokens. Consider word as any sequence of letters that are uppercase or lowercase. The numbers or other cha...
[3 replies] Last: Get whole line Create vector<string> to hold all the output words crea... (by Moschops)
Char to word comparison with if statement
 
I have my code and it seems to run fine but when I run the code and enter left or right it uses the else statement instead of the if statement(s). If I remove ...
[7 replies] Last: Look, I'm still learning how to program. I haven't even made it past t... (by PocketTNT)
tolower() problem.
 
#include "stdafx.h" #include <algorithm> #include <iostream> #include <string> int main(){ std::cout << "Are you OK?"; std::string a; std::cin >> a; tolow...
[1 reply] : tolower() operates on a single character at a time. Also it leaves t... (by Chervil)
sort function
 
I have no idea why this sort function is not working. Help would be appreciated Im trying to get the list of people sorted by their birth year. But I cant figur...
[3 replies] Last: You're trying to output a Person object, right? cout << knows all ... (by Moschops)
I need help making a number guessing game.
 
Write your question here. Hi I have just started coding and was wondering if you could help me out. It keeps telling me the answer. I also need to make it ask...
[6 replies] Last: you should put your do{/* . . . */}while(guess != randomNum); inside... (by etrusks)
Arrays and strings
 
Hello. I'm writing code that will take a string as input, store it in an array, then analyze the array to see how many of the user input character there are in ...
[1 reply] : string phrase is an array of strings not an string. so each index of ... (by Calcushtag)
March 2016 Pages: 1... 4041424344... 47
  Archived months: [feb2016] [apr2016]

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