Beginners - February 2018 (Page 17)

Program isn't reading my ending values
 
So I'm trying to set up my game of NIM so that once the game is over, it asks if you'd like to play again with either a 1 or a 0. I have an if statement set up ...
[4 replies] Last: yes, return 0 is used to close the program, but that is what you wante... (by Manga)
Need help for leap year program using switch
 
So everything seems to be debugging pretty nicely. Now, I just need something that will let February show up as 29 days as opposed to 28 days if the person ent...
[3 replies] Last: ok, fine, lol, but the point is to be clear up front what a leap year ... (by icy1)
c++ program code needed
 
write a program in which a string is entered through user and convert into a string whose every odd space has a capital letter and even space has small letter ...
[11 replies] Last: Divide and conquer! Plan out your approach step by step. 1. Obtain us... (by icy1)
Accessing variables declared in Main
 
Hello, i have this variable in the main.cpp file: //Screen dimension constants const int SCREEN_WIDTH = 1024; const int SCREEN_HEIGHT = 768; int scrollingYO...
[8 replies] Last: Thank you for the precious info. (by Amiplus)
by Daim
Need Help with file handling
 
hello everyone, l am learning programming on my own and l was watching tutorial on youtube about "File Handling" and l was wondering how we can read and write i...
[2 replies] Last: A class can write to a file. Often a class will self-serialize, or co... (by jonnin)
Intertwine characters in strings
 
Basically assignment wants us to mix up the characters in strings. like so ("Fred", "Mary") yields "FyrreadM". And if one string is longer than the other, appen...
[3 replies] Last: I got it thanks guys! (by barry23)
Program crashes when inserting more numbers into BR Tree
 
So everything seemed to work fine until I wanted to generate bigger trees with random numbers. When dealing with numbers from 0 do rand(), the program crashe...
[3 replies] Last: And youre right, I overlooked the duplicates... When I was implementin... (by crowstorm)
by ehmad
programming printing values twice
 
i am trying to make a hotel management system in c++ and it is almost in its complete phase but having some logical issues.These some things needs to be sorted ...
[3 replies] Last: Hello ehmad, Your biggest problem is while(!fin.eof()) is not worki... (by Handy Andy)
by Vinz24
help in adding n numbers using function
 
can someone help me with my codes I'm new to function. what is wrong with my codes? #include<iostream> int addition(int); using namespace std; i...
[3 replies] Last: thank you @lastchance it works! :) (by Vinz24)
archive write issue
 
I'm trying to write a array into a binary archive but appears 2 weird errors. The array to be written is pointer array, like a dynamically allocated matrix, do...
[1 reply] : it does not matter what the data is or where it came from. What are t... (by jonnin)
clear
 
how do you remove movie name:, adult ticket sold? and child ticket sold? from the output? when you run this code i use those to gather information. so i need t...
[3 replies] Last: and also i tried to use pause for the cin fails but i dont think it wo... (by poohbear)
Name, Age, Classification Coding Problems
 
I have to design a program that checks the age, classification, and name of a person to decide whether or not they are old enough to vote. When I run my code, ...
[4 replies] Last: @danwiffle using namespace std is considered a bad practice because of... (by An Integer)
by gunay
bubble sorting
 
Write your question here. Hi there, pls comment my mistakes #include<iostream> using namespace std; int sortingfunc(int arr , int size) { int temp;...
[1 reply] : First, please use code tags when posting code. See http://www.cplusplu... (by keskiverto)
check whether certain variable is member of that structure
 
I want to check if certain variable is member of structure or not. For example, I have a structure like this: struct distance { int feet; int inches; char ...
[3 replies] Last: A struct is a class. Members of a class should be initialized by the c... (by keskiverto)
C++ vending machine
 
WriteCreate a program that simulates a vending machine. The vending machine offers three products: Soda, Juice, and Water Bottles. Soda costs P30, juice costs P...
[2 replies] Last: Perhaps you should plan out what your program is going to be doing. It... (by fiji885)
by Carat1
getting website text
 
this code gets the pastebin text and puts it in a textbox. how can i make it read line by line instead of reading it all? if i were to make my pastebin like th...
[7 replies] Last: Yes .NET makes many things very simple. BTW. It might not work with a... (by Thomas1965)
Reading .txt file to 1D and 2D arrays
 
I have a .txt file that have data that read like this: Abraham Jackson, 10, 15, 10, 13, 8, 18, Joe Harrier, 13, 4, 5, 27, 12, 14, Thomas High, 21, 2, 4, 15, 7...
[3 replies] Last: I answer this with caution as, without seeing the actual terms of your... (by lastchance)
Why am I getting Syntax Error? "error C2059: syntax error: '<<'"
 
Trying to see what I'm overlooking in order to get this error code when building my program. #include "stdafx.h" #include <iostream> #include <iomanip> ...
[2 replies] Last: Ah, thanks! (by Saviorskid27)
Can't get output to product decimal
 
I am trying to calculate the quotient of two numbers. However, when they do not divide evenly, I want it to product a decimal instead of just the integer. I hav...
[3 replies] Last: double quotient = integerOne >= integerTwo ? double(integerOne)/... (by cire)
Trying to find largest number
 
I am trying to find the largest number from a set of three user-inputted integers. I started c++ one week ago, so simple solutions would be appreciated. I have ...
[2 replies] Last: @joe864864, thanks a lot! That was a very quick, sufficient answer. I ... (by stormbot)
February 2018 Pages: 1... 1516171819... 28
  Archived months: [jan2018] [mar2018]

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