Beginners - September 2016 (Page 8)

Program help
 
Hello! I'm very new to C++ and I have a program I need to write that I do not know how to start. The prompt is: "A loop that keeps reading words until it runs o...
[14 replies] Last: It's not clear what you mean. You should try it out in your code inste... (by closed account 48T7M4Gy)
How to negate case sensitivity.
 
Ok, really suck at this so far, but I've managed to code enough to get a working program. The question is for a college programming class, the question wants me...
[13 replies] Last: Woohoo! Thank you Sakura! Now could you tell me why that fixed it so I... (by Viking86)
finding ' symbol
 
I'm writing a bit of code that needs to determine if a char variable is an apostrophe ('). My code doesn't seem to recognize it though. Does using the escape ch...
[3 replies] Last: thanks for the help! (by closed account oEwqX9L8)
Is there a built in means of reading a vector<char> line by line?
 
I have a file I'm reading into a vector<char> buffer, reading through it for keywords, and adding new lines between old lines at those keywords. Currently, I'm ...
[5 replies] Last: For me this is mostly a learning exercise. A custom allocator would de... (by zerophase)
by fm401
Help with a question!!!
 
Hey guys. So I have a problem that I was trying to solve but i am a beginner at C++ so i am having a really hard time solving this and coming up with the code. ...
[2 replies] Last: http://www.cplusplus.com/forum/beginner/198344/ (by closed account 48T7M4Gy)
by fm401
C++ beginner in need of help with a problem
 
The formula for C(n,k) can be expressed as the product (1+(n-k)/1) (1+(n-k)/2) (1+(n-k)/3) ... (1+(n-k)/k). Write a program to implement this (note that the ter...
[3 replies] Last: http://www.cplusplus.com/forum/beginner/198341/ (by closed account 48T7M4Gy)
by Xizor
How to read file and calculate data
 
Hey, I am new to C++ and I have this project I need to do for class. I am given two .csv files and I have to use the data in them to calculate certain things. M...
[1 reply] : int a, b, c, d string e while( elect12 >> a >> b >> c >>d >> e) { ... (by closed account 48T7M4Gy)
Need help with functions
 
Hello :) I need help. I am having so much trouble with functions. Declaring them and calling them. I have a program I have to do that I have to declare and...
[8 replies] Last: Sorry for the late reply. That's becoming a lot clearer to me now! I w... (by Saibachick)
Error when trying to open file created by user input
 
I am trying to get an input file to open after a user inputs the filename. But whenever I run my test to see if the file is open, it always returns the file did...
[4 replies] Last: Hello marc4120, How do I create the input file without knowing what ... (by Handy Andy)
Manipulating Random Word Generation
 
Hello, I would like to know how I can manipulate the results for a string such that 20% of the time a string of 7 words of which one is a symbol. This is my...
[4 replies] Last: I figured a way to fix it: I replaced the else if s with just else sta... (by CelestialX)
Functions & Calculations
 
222
[2 replies] Last: Hello dawnstar, Read up on setw, setpersion in the iomanip headder fi... (by Handy Andy)
more stuff about cin?
 
recently i found out that cin doesn't just ask for input, it also can do cin.fail and stuff. What the heck are those? I don't know about those things... maybe t...
[1 reply] : There are about 400,000 matches on google, some like this one. https:/... (by SamuelAdams)
Need Assistance with Simple Program
 
I'm having trouble figuring out how to finish this assignment. Basically, the program prompts user for first name and then outputs a menu for them to "purchase"...
[2 replies] Last: Hello cimps1987, I had to guess at some of this, but to alter the out... (by Handy Andy)
access a class that is a private member of another class
 
Hi, here my program I have a class wrestler and a class team. The class wrestler as you can see has ability point and weight etc... The class team has wrestle...
[2 replies] Last: @personxd1 Is there any chance that you can make a simple code example... (by CaptainFritz)
by rantiv
loops and nested loops
 
This program outputs a downwards facing arrow composed of a rectangle and a right triangle. The arrow dimensions are defined by user specified arrow base height...
[2 replies] Last: for (h = 0; h < arrowBaseHeight; ++h) { for ( w = 0; w < arrow... (by Hengry)
error compiling
 
I am working on one of my first c++ projects. I was provided with a .h file and had to write a .cpp file, but it won't compile. I keep getting the error message...
[1 reply] : What *.h and *.cpp files do you have and how do you compile? In other ... (by keskiverto)
by rantiv
reducing an if statement
 
So i had to write a program to determine which car is better depending on user preference and i didnt realize until the end that The TA will check part 4 to ass...
[2 replies] Last: yes ok! Thanks! (by rantiv)
by Amker
having problem with while loop
 
i am new in C++,My program is asking user to enter integer, and i want to show the error message when user enter anythings expect integer.But i have a problem,w...
[1 reply] : It looks like the program exits due to this line: if (a < 666) retu... (by EtDecius)
writing into a map from a file
 
i am trying to get the contents of a file in to a map. in a more detailed explanation: the file im reading from is a .txt file and is open in regular format (o...
[13 replies] Last: thanks for trying to provide help with the problem i finally came to a... (by globaltourist)
by jeg19
if statements and modulus
 
I was given the assignment to write a program that asks the user to enter a number of seconds. -There are 60 seconds in a minute. If the number of seconds ente...
[7 replies] Last: Hello jeg19, You have two choices for dealing with a negative number:... (by Handy Andy)
September 2016 Pages: 1... 678910... 34
  Archived months: [aug2016] [oct2016]

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