Beginners - February 2018 (Page 12)

by lpetre
Ye ole Rock-Paper-Scissors game, Creating/Calling functions
 
Hello, I am new to programming and need help with an oldie. I have read many other posts about the Rock-Paper-Scissors program, but cannot locate an answer for ...
[3 replies] Last: Never mind. I found it! After entering 1, 1, 1, .... enough times, I h... (by lpetre)
vector even positions
 
HI I have a .txt file that has a data that i have read and saved inside a vector container. now those data saved has a mixture of strings and integers. by the w...
[6 replies] Last: thanks thanks you guys really helped a lot. much appreciated (by paulpv278)
by Ephan
Printing the output of a function in int main()
 
Hi guys. I have a problem with functions. To put it simply. If I create a void function that does something when I call it, and I want to print (i.e. cout...
[4 replies] Last: Thank you so much. (by Ephan)
Initialize following nested class
 
Based on the following classes below. I need to create a customerqueue object which consists of customer object. How do I go about creating customer queue objec...
[no replies]
by MrDS
Changing cursor image with C++
 
Is there a way to change to cursor image for Windows? I've looked on the internet and couldn't find anything that worked for me
[1 reply] : https://msdn.microsoft.com/en-us/library/windows/desktop/ms648379(v=vs... (by SamuelAdams)
by Marr
deference b/n char array and strings
 
hello guys is their deference between character arrays and strings ? ans with example! tanks!
[3 replies] Last: By the way a char array is not necessarily a C-string. To be a C-strin... (by jlb)
Help with Bool (rock paper scissor game)
 
I am having trouble getting the bool to switch so i can change turns. It just keeps telling Player one it is his turn and to input an answer. #include <iost...
[2 replies] Last: If you do this: if (player1 = true ) {} You are not testing player... (by TheToaster)
Read line by line txt file and display to console in columns
 
For some reason I can't figure out how to read my txt file line by line to display in three columns; title, artist, and cost... #include <iostream> #includ...
[5 replies] Last: Just figured it out! Thank you so much for the help! :) (by GoatWater)
HELP with Ask and get n (the number of times) to print the letter “X”. Using a while loop, print the letter X n times.
 
Ask and get n (the number of times) to print the letter “X”. Using a while loop, print the letter X n times. I am not sure how to start this code... ...
[5 replies] Last: Thank you! (by anoanomous)
float time = int minutes / 60 equals 0?
 
Why does my float time keep returning 0 when it is initialized to be int minutes/ 60? It is boded and underlined below. #include <iostream> #include <iomani...
[3 replies] Last: I fixed it by adding a .0 after the 60. So now it looks like float act... (by zarkangelks1)
Sorting Competitors and Printing out finalists
 
Hello guys so I need help on a project that reads from a .csv file into a dynamic 2d array or a vector. The CSV file contains details of a swimming competition ...
[8 replies] Last: I don't know how to use a vector of the struct You would create a v... (by jlb)
Perfect Numbers
 
This code will not produce any output. It should find all the perfect numbers between 1 and 1000. #include<iostream> using namespace std; int main() { i...
[1 reply] : Swap the > for < on lines 6 and 9. (by lastchance)
Floating Point Exception
 
I am not a programmer. I took a class a year ago and recently decided to modify a hangman game I made. Instead of making a game, I am trying to input a file ...
[1 reply] : The remainder of a division is undefined if the divisor is zero, thus ... (by helios)
Problem with Classes and Class calls
 
Hi! I'm making a program whose purpose is to create an object that represents a single playing card. Then I need to perform several different operations on said...
[1 reply] : Hello! Unfortunately there is not only your setRank function that has... (by Misenna)
Need help reversing a word
 
So I missed a lecture where the professor went over character arrays and now I don't really know what I am doing. Here are the instructions: 1. Start by pro...
[3 replies] Last: Highlight line 31 and 32 and paste the following: std::cout << "The... (by Uk Marine)
comparing variables...
 
I am trying to exclude all values from a do loop that aren't integers, but not sure how to do this. I have nested do loops, one that will hopefully exclude all ...
[13 replies] Last: This works, but the only thing that gets me, is when I ask for an inte... (by link45jeff)
Help on C++ Program that generate password
 
Please i am new here and a C++ beginner, also a student. I was asked by my lecturer to write a C++ program that will generate password. Such that when a user ...
[2 replies] Last: Ok Neahle. Thanks, i will do that now. (by dmatths)
How to ignore certain things entered into console?
 
Hello, I'm new here and you'll be hearing from me a lot! Ive recently gotten into C++ and I decided to make a program to add two fractions. But what Ive gotten...
[6 replies] Last: Thank you guys so much! Sorry for late reply, Have a great weekend! (by sciman777)
X- Puzzle Solver Not Working (Quadratic Expression Factoring)
 
Whenever I run this code to solve x-puzzles I get weird outputs that don't make sense or sometimes the program will just sit there. Occasionally, it will put ou...
[4 replies] Last: If x1+x2=b and x1.x2=c then x1 and x2 are just the roots of the quadra... (by lastchance)
Cout array members by one int identifer member
 
So I have a array of structs with members firstName, lastName, and testScore read in from a text file. I need to set a max grade, or highest grade, from the tes...
[2 replies] Last: To find the student with the highest score you can use std::max_elemen... (by Thomas1965)
February 2018 Pages: 1... 1011121314... 28
  Archived months: [jan2018] [mar2018]

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