Beginners - March 2016 (Page 2)

Cannot get an array's index to output correctly
Title. Every time I try to get the largest number in an array's index to display, it just puts out 0. What am I doing wrong? #include <iostream> #incl...
Mar 31, 2016 at 9:01am
[3 replies] Last: You're not storing that information anywhere. On line 27, you need to ... (by Moschops)
Help please!
I have to make a program for school to encrypt a message with the "code Cesar". I made a function to encrypt the message but when I add the key to the message I...
Mar 31, 2016 at 7:05am
[7 replies] Last: I put an absolute value in the if condition and nomit works without an... (by lemniscate12)
HELP
IDK HOW TO USE C++ but i would like to learn plz help
Mar 31, 2016 at 5:05am
[1 reply] : http://www.cplusplus.com/doc/ (by chicofeo)
void function with 4 parameters that must display (1,2)
The void funcnction( voidcost() ) displays everything except the variable tax, tip, and totBill in it? #include <iostream> #include <iomanip> using name...
Mar 31, 2016 at 4:03am
[24 replies] Last: great it works perfecr like that?? I would have spent another day bang... (by miah612000)
Void Functions and Error Message not working
Hi I have been spending several hours trying to debug this program but with no luck. I temporarily turned lines 74-76 into documentation and the program compil...
Mar 31, 2016 at 3:41am
[3 replies] Last: With the code tags: Edit your post, select the code, then press the <... (by TheIdeasMan)
Reading, converting, and outputting strings
I am trying to complete this assignment and I am having some issues. If someone could just point out whats going wrong I would greatly appreciate it. Below are ...
Mar 31, 2016 at 3:38am
[1 reply] : What exactly is going wrong? Be specific. If you haven't yet, you can ... (by CS Student)
Loop
The character 'b' is char('a'+1), 'c' is char('a'+2), etc. Use a loop to write out a table of characters with their corresponding integer values. a 97 b 98 ...
Mar 31, 2016 at 3:35am
[1 reply] : If you are just starting out with C++, I wouldn't read anything from B... (by CS Student)
Calculating mean and standard deviation
I have to make a program that calculates the mean and standard deviation of 5 numbers but I keep getting a ridiculously big number for the mean and -2 for the s...
Mar 31, 2016 at 3:30am
[3 replies] Last: Please always use code tags : http://www.cplusplus.com/articles/z13hAq... (by TheIdeasMan)
Reading in spaces and editing chars in getline?
I can't read in spaces to the array. But when I switch to getline I don't know how to edit out the vowels. Please help! Trying to figure out the problem in ...
Mar 31, 2016 at 3:27am
[1 reply] : cin does not collect spaces. In fact, it reads whatever you entered up... (by CS Student)
Reading any line of a file
Hello folks, i'm a newbie herein this forum. I'm using QT Creator in compiling my work. i can't seem to read the next line of my file, whenever i switch usern...
Mar 31, 2016 at 2:08am
[11 replies] Last: Thank you sir. (by mortdecai)
How to return a c string array?
How can I return a c string array? I'm writing a function that needs to return a c string array reference but I keep getting errors when I try to return it. How...
Mar 30, 2016 at 10:29pm
[1 reply] : char * encoded ; This is an array of 500 char-pointers. Is that what... (by Moschops)
Comparing Temperatures
From a file of a temperatures I trying to compare different temperatures. Unfortunately I'm getting multiple outputs when I only want one. I just need either ...
Mar 30, 2016 at 10:14pm
[4 replies] Last: The last condition doesn't need an else if because if neither of the... (by Chervil)
Recurrsion Maze
I'm having some trouble with the actual recursive part. It's a maze that displays from a text file which opens file and displays as it should, but I cant get th...
Mar 30, 2016 at 10:10pm
[8 replies] Last: +++ +++ ++ this is the text file Im working with + + +++ ++ + + ... (by ArtisticMess)
No output
Hi, Im really really beginner. Im stuck with no outputs. How can i solve it? The code is for this question: A palindromic number reads the same both ways. ...
Mar 30, 2016 at 9:57pm
[9 replies] Last: When you add the line i--; your code outputs 0. This is because... (by Too Explosive)
Help with Virtual Store Program
Hi guys. So I needed to create a virtual store program using file input/output, functions, and vectors. I have the program complete, but there is just few quest...
Mar 30, 2016 at 9:31pm
[1 reply] : Can someone tell me how to make a variable that adds to itself I gi... (by keskiverto)
I need to shift array elements to the right a certain number of times?
First: I have no idea what I'm doing or where to begin. I've been told by my professor that this problem is supposed to be "a simple loop inside a loop". Yet I ...
Mar 30, 2016 at 9:25pm
[1 reply] : Moving right is the "easy part", but what to do with the "edges"? The... (by keskiverto)
Calculating Time With Recursion
Hey so I need help with writing a recursion function that that calculates the time needed to travel a given. You input a distance. If the distance is 1 metre or...
Mar 30, 2016 at 9:04pm
[4 replies] Last: Omg I just tried that and it worked^ thank you!! (by cmptloser)
Deck of Cards Vector help
Hi all, I'm trying to figure out how I can store all 52 cards in a vector without pushing everything back because it consumes a lot of time. Is it possible to a...
Mar 30, 2016 at 5:48pm
[1 reply] : You mean something like: vector<string> deckOfCards = {"AS","JS",... (by jlb)
C++ BubbleSort Help
Write a program, which will ask the user how many whole numbers they wish to enter. The program will then read that many numbers, print them in the order they w...
Mar 30, 2016 at 5:46pm
[2 replies] Last: Bubblesort.h #ifndef BUBBLE_SORT_H #define BUBBLE_SORT_H void Bubble... (by Scaseygg)
Reading text file
I have a text file containing: int Bob, 2you, john, AdamSmith; float taxYear=2013, taxRate=29.2.3; And I need to read it in a way where I analyze: int Bo...
Mar 30, 2016 at 5:40pm
[2 replies] Last: If the file has been written into the program file use ofstream myfile... (by miah612000)
March 2016 Pages: 1234... 47
  Archived months: [feb2016] [apr2016]

This is an archived page. To post a new message, go to the current page.
Registered users can post in this forum.