Beginners - September 2016 (Page 10)

by Arquon
How to properly align text ?
 
Hi, my text gets distorted as soon as any variable gets 2 numbers in it. How can I make my text stay in the same position ? #include <iostream> using nam...
[6 replies] Last: It worked, thank you ! It looks so beautiful to my eye right now. (by Arquon)
if statement and assignments
 
hello I was given an assignment to generate a payroll for employees using two arrays. one for employee details and one for the computations.senior members and j...
[2 replies] Last: Hello yawpius, I can assure you the the else or (else if) does not ov... (by Handy Andy)
for loop statement
 
I am working on a lab for statement problem and i can't figure out how to start it. Make a program that will input the 10 numbers and determine their average ...
[8 replies] Last: @ keskiverto yes ! i know Turbo C++ is old but our school still using ... (by spike32)
by ahutch
Help: Searching string for characters
 
So my assignment is to search an inputed DNA string for the characters "A G T C" using a bool function but no matter what I try, I cannot get the string find fu...
[2 replies] Last: Thank you, my code works now! (by ahutch)
Program stops at delete
 
My program stops executing at the line where I delete dynamically allocated memory in a function of a class. delete array; array is a member ...
[2 replies] Last: @cpp1024 Post the whole code and we will be able to help you. (by boost lexical cast)
by rantiv
Random number generator
 
I dont really get what it is asking me to do. "Type a statement using srand() to seed random number generation using variable seedVal. Then type two statements...
[6 replies] Last: I think your original code already does what it's supposed to do. (by Peter87)
How do I compare two characters and give it a value?
 
Hi guys, I just found out I can't use arrays or strings for my homework assignment so I have to redo the entire thing. I have most of it done, however, I c...
[2 replies] Last: Crap sorry, forgot to add that. Just added it now. ntak should be it... (by Tomallama)
Flight Times Help!
 
I wanna make sure I'm on the right track, and to have a little help! Thank you in advance. Flight times in the United States can be estimated using a form...
[3 replies] Last: Thanks Andy that helped alot! #include <iostream> #include <iomanip... (by Unisaurus)
by mtmsl
Error When Trying To Load A Sound File
 
Hi everyone. I'm not sure if this is the correct forum for my question, but here goes. I've been working on a program using Windows API. I'm attempting to play ...
[2 replies] Last: It sounds like you're describing two problems. 1.) The linker error 2... (by xismn)
Unknown error
 
I am getting this error that I have never seen before. It seems to be related to setiosflags( ios::fixed || ios::showpoint ). Error is ||=== Build: Debug i...
[1 reply] : // the setiosflags( ios::fixed || ios::showpoint ); // is like const... (by keskiverto)
operator overloading
 
hello, i am trying to write the definition for a class which looks like the following and the problem i am facing is with the addition and multiplication operat...
[5 replies] Last: thankyou a lot. (by riyadhhossain01)
Craps Game Loop
 
I cannot figure out (in my 'all of seven C++ classes' how to make this loop work right when the same digit can be used a second time in a different way. I put ...
[no replies]
I need help
 
Why is this giving me 25 times the same number and not all random ? #include <iostream> #include <windows.h> #include <cstdlib> #include <ctime> u...
[4 replies] Last: You seed the pseudo random number generator each time you call your fu... (by closed account E0p9LyTq)
How to Structure fstreams
 
Write your question here. How would a fstream look if I needed to enter this data? Flash_Card_One (Variable 52, Variable 26, Variable 54, Variable 24); Fla...
[17 replies] Last: You've just restated what you have said before. You haven't clarified... (by AbstractionAnon)
by rantiv
Simon Says
 
The program is suppose to compare the two strings starting from index 0. For each match, add one point to userScore. Upon a mismatch, exit the loop using a brea...
[1 reply] : Line 19: You're going to break out of the loop on the first iteration... (by AbstractionAnon)
by texagg
Sort List of Names (Sort, Array, Strings)
 
Hello All! So task is two-old. I must ask the user for the number of students, which can be from 1-25. I must then ask for their first names, and sort the li...
[7 replies] Last: Line 23: C++ does not support implied left hand side in conditionals.... (by AbstractionAnon)
by ll1234
how to let 125 become 521
 
Write your question here. how to cin 125(one hundred and twenty five),cout 521 (five hundred and twenty one).
[3 replies] Last: And if you want 521 as an int.. #include <algorithm> #include <iost... (by loonielou)
common parts in two strings
 
Can anyone indicate where I can find C++ code, that gives all (not only longest common substring) common parts from two strings. for example: from input stri...
[1 reply] : 1. How do you compute the "longest common substring"? 2. What should ... (by keskiverto)
expected initializer before '&' token
 
Hello, I am getting this error: expected initializer before '&' token which references the line std::istream &operator >> (std::istream &in, Maze &m); ...
[1 reply] : Asked and answered here: http://www.cplusplus.com/forum/beginner/19816... (by AbstractionAnon)
Errors Out Of Nowhere
 
So Yeah,i decide to download Visual Studio Community 2015 because i wanted to do c++ for fun,for my first program i tried like what everyone else would do a sim...
[8 replies] Last: <Your Project> Properties -> Configuration Properties -> C/C++ -> Prec... (by booradley60)
September 2016 Pages: 1... 89101112... 34
  Archived months: [aug2016] [oct2016]

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