Beginners - December 2016

How do I cin chars into an array and stop when the console reads a specific char
 
What I want to do is to input characters into an array and stop the inputs and set the array length once a certain character is inputted. I'm unsure on how I ca...
[1 reply] : Sorry, but you can define the size of the array after inputting data i... (by joe864864)
Beginners adventure rpg
 
I'm in the middle of creating a really basic rpg as a way to try to learn c++, and I want units to attack each other with a base damage with a random modifier a...
[2 replies] Last: This video has you covered. https://www.youtube.com/watch?v=pc-fA05eKZ... (by Marcus Aseth)
Need help for coding!
 
QUESTION 3 A bank in your town updates its customers’ accounts at the end of each month. The bank offers two types of accounts: savings and checking. Every c...
[4 replies] Last: The program should then output the account number, account type, curr... (by dhayden)
pseudo rand exercise help!
 
For some reason I am totally lost, i literally understand everything until the part where "balls == ball ", basically I dont want the same numbers repeated in ...
[2 replies] Last: thank you so MUCH FOR YOUR BREAK DOWN AND YOUR TIME. I guess I just ne... (by UnKn0wN n00b)
by rviens
Trying to apply conditionals.
 
I'm trying to create conditionals to make my program error free, and in the calculation function I seem to fail completely while applying them. I don't know any...
[6 replies] Last: Here is a simple demo how to find the smallest element is 2d array. Ma... (by Thomas1965)
by Leo Li
Operator overloading question
 
I am new to C++ programming, and i currently working on operator overloading. I modify one sample code in order to see which constructor and which deconstruct...
[2 replies] Last: Thank you for explanation ! its really helpful ! (by Leo Li)
Persistent data storage options
 
This is one of those questions that solicit contextual information. In particular, I'm interested in learning the different ways that a C/C++ program can store ...
[1 reply] : C++ is a flexible and modern programming language, you are only limite... (by wizebin)
Basic command line question
 
Why is it that when I try to run a program on my compiler, nothing happens. Instead, the editor opens up! I created many basic programs in the past and they all...
[4 replies] Last: Peter87, you are a genius of the highest order! I am not worthy....hah... (by closed account 28qpoG1T)
Program crashed after use of .length()
 
I started using .length in a basic game that is going to have the user guess a number, but if they enter input too short or too long it will tell them to guess ...
[5 replies] Last: Thank you! I probably should work over my logic on these things, as I'... (by moosyman)
file handling, last bit repeating twice
 
i tried reading a file using fstream class object. the content of the file was : "i like c++ programming" (without the double quotes) now when i access the fi...
[3 replies] Last: in addition to correct replies above also after running my code when ... (by Cubbi)
general question
 
this may sound like a really dumb question, but how/when if at all would one call any of the protected std library functions ? such as streambuf::eback(); or ...
[4 replies] Last: There is a small demo that calls streambuf::eback here if it helps: ht... (by Cubbi)
How to go about this
 
Hello! How's it going? How would you go about making C++ code for finding all possible combinations for a list of numbers? Then subsequently taking those co...
[1 reply] : Well I'd go about it by first trying to write some code (or at least s... (by gunnerfunner)
by heckl
print out text file content into string array
 
i Would like to print out an entire text file into the string array insert. #include <iostream> #include <string> #include <algorithm> #include <fstream...
[5 replies] Last: forgot but i think ostream where you could read the text in there as ... (by integralfx)
Any way I can make my program NOT select the same string in the array twice?
 
Hi. I am writing a program that takes 8 soccer teams and draws them randomly to play against each other. Every time the program runs, it selects the same team t...
[3 replies] Last: #include <iostream> #include <string> #include <ctime> #include <rand... (by JLBorges)
question
 
hey guys... you know console game right ? well...how do I make the enemies move whithout me pressing any key( like snake, in the snake game, the snake move on...
[2 replies] Last: @Flaze07 Here's the beginning of the game I decided to write, based o... (by whitenite1)
by BjornC
What's this? a().b()
 
New to C++ and this website's articles are great. I don't have a degree in computer science, but interested! Let's say we have something like this Reque...
[1 reply] : Request->OnProcessRequestComplete() returns an object (or a referenc... (by Peter87)
by user42
help with program
 
Hi im a beginner in c++ there is this example that i am supposed to do and i dont really know how. iw ould appreciate some help. the example is: write a pro...
[19 replies] Last: #include <iostream> // includes... #include <cstdlib> // .......... (by user42)
Strange If statement? C++
 
Write your question here. Ok so I just can't quite seem to get my head around what is going wrong with this if statement. if any one could please point out w...
[4 replies] Last: Oh my mistake! I over looked that at the top! Thanks! :) (by LordDeek)
Borderless?
 
A simple question, is it possible on a cmd to create a borderless or make right-upper buttons unavable? Tnx in advance. EDIT: I just want to make a cmd window ...
[5 replies] Last: It worked! THANKS a lot! (by CosminPerRam)
Sequence of number
 
I want to make a program that displays the square of the number from 0 to 14 using do while loop. Here i think it is almost done but something is TO BE DONE. Th...
[2 replies] Last: Thank you so much sir! (by ArslanFaisal1122)
December 2016 Pages: 123... 28
  Archived months: [nov2016] [jan2017]

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