Beginners - February 2017 (Page 25)

Trying to find a Mode using Parallel Arrays
Good Afternoon All I'm a newbie when it comes to C++, I would love to see if the bright minds here would be able to help with with my issue. I'm tasked with ...
Feb 10, 2017 at 5:15am
[1 reply] : are you sure that mode is always assigned in that loop? could it fol... (by jonnin)
What is the best way to check for input errors?
I have a simple code which reads some numbers from a keyboard and I want to make sure that if the users input anything else but numbers he gets an error message...
Feb 10, 2017 at 5:03am
[2 replies] Last: goto is exceptionally rare in c++. It isn't generally needed, and is... (by jonnin)
structs and c style strings
Im trying to learn how to use structs now and i can't seem to figure it out, Im having problems using a c style string or char array in my struct and there are ...
Feb 10, 2017 at 4:56am
[3 replies] Last: Forget the loops. 1 and 11 are not equal, but I suspect a typo or som... (by jonnin)
Reading in a file word by word?
I am writing a program that needs to read in from a file word by word (ie- read from one whitespace to the next whitespace and store those characters in a strin...
Feb 10, 2017 at 3:46am
[1 reply] : while( file >> word ) { // process word... } (by integralfx)
Histogram Hysteria
I am making a program where the user inputs grades. Once they input -1, a histogram is printed. However it works the first time in a category but then it goes u...
Feb 10, 2017 at 3:25am
[2 replies] Last: Thanks Mantorr22. Simple fix :) Jared (by closed account 3vX4LyTq)
Help I need help writing my string out put
I am trying to have this code print out No! I've been able to get it to print out Yes! but not no. Here is the problem. Keep asking the user for characters un...
Feb 10, 2017 at 3:03am
[6 replies] Last: I honestly have been trying to figure out this code by myself now for ... (by jollyholly11)
Link List Problem
This Code is Working Fine but i want the output in right order not in reverse order i am so confused (new to data structure) #include<iostream> using namesp...
Feb 10, 2017 at 2:42am
[2 replies] Last: - use the ctor's to initialize objects when feasible; - const qualify ... (by gunnerfunner)
Send Email
Is is possible to send an email in c++ ?
Feb 10, 2017 at 12:50am
[2 replies] Last: Look into libcURL. There is SMTP support. https://curl.haxx.se/libc... (by mbozzi)
histogram for data
Hello, I'm very new to programming, been doing it only for a few weeks. My college professor kind of likes to throw us out on our own without a lot of instructi...
Feb 10, 2017 at 12:14am
[1 reply] : you need a way to store what you have processed, how about an array? ... (by jonnin)
Alignment issues
I am having problems trying to get the output aligned. I have been working at it all day and have got no where in getting all the columns lined up with all the ...
Feb 10, 2017 at 12:07am
[no replies]
Storing numbers in a 2-D Array from a file with numbers and letters
I'm trying to write a program that takes numbers from a file that contains numbers and letters. The first two numbers of the file tell me how many rows and colu...
Feb 9, 2017 at 11:20pm
[1 reply] : The while loop is pointless as you will have to iterate through all th... (by integralfx)
by JJpit
displaying the most and least occurrences of letters from a .txt file
I have a program that I am writing where I have to count how often a letter appears from a .txt file. I got that done and was able to write the code for the pro...
Feb 9, 2017 at 10:10pm
[2 replies] Last: To think all my trouble and going over and over it was all due to a si... (by JJpit)
by simer
Something wrong in my code...
My output is not what's I expect. #include <iostream> #include <string> using namespace std; struct MusicTrack{ string artist; string genre; ...
Feb 9, 2017 at 9:45pm
[5 replies] Last: No, new is used to allocate memory. pointerVariable = new type; It... (by joe864864)
[Accelerated C++] - Function read_homework returns istream&. Why??
I am reading through the book, and on p. 57 there is the code for this function, which should take as inputs the grades of the homework of a student and constru...
Feb 9, 2017 at 9:11pm
[3 replies] Last: > But mostly of all: why does this function returns "in"? What is the... (by Enoizat)
by yeera
How to convert c++ project
Hello, i'am using borland c++, how to make my project can be open in all windows platform without installing borland ? coz when i try to open my .exe project i...
Feb 9, 2017 at 6:38pm
[2 replies] Last: If you want to copy the .exe as a stand-alone program, and use it on a... (by Chervil)
Loops - Drawing a Tree
#include <iostream> using namespace std; int main() { // Draw leaves cout << " *" << endl; cout << " ***" << endl; cout << "*****"...
Feb 9, 2017 at 6:20pm
[1 reply] : See the "for loop" section here: http://www.cplusplus.com/doc/tutorial... (by dhayden)
Checking for Characters in an Array
Let's say I had an array of different names, and I wanted to check if the name started with a particular letter, which in this case is 'J'. How would I check fo...
Feb 9, 2017 at 6:14pm
[1 reply] : You can reach the first character of std::string name through name , s... (by gunnerfunner)
converting file to Rot13
I making a program that suppose to read a file that was given by user and translates it to rot13. I tested the program it reads the file but it does not convert...
Feb 9, 2017 at 4:26pm
[5 replies] Last: instead of cout << rot13 you need outfile << rot13 I think, then open ... (by jonnin)
Menu-Driven Application
I'm way out of my league right now!!! I have to code, build and execute an Automated Teller Machine Menu-Driven Console. The output must include the following: ...
Feb 9, 2017 at 3:58pm
[11 replies] Last: Hello Turner1981, Once I cleaned up the extra closing "}" the program... (by Handy Andy)
Calculating percentages question
I am stuck on how to calculate percentages for the total number contributed by each different size of pizza. My book doesn't have any examples of using division...
Feb 9, 2017 at 3:09pm
[6 replies] Last: ah, ok if it runs that makes sense. #inf isnt an error. Its a "spec... (by jonnin)
February 2017 Pages: 1... 2324252627... 37
  Archived months: [jan2017] [mar2017]

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