Beginners - September 2016 (Page 2)

by mmcro
Issue with vectors
 
Goal of the assignment - user inputs a series of numbers (ex.num=12345) as well as different single digit numbers for d and d2. if d is in the original series o...
[6 replies] Last: @mmcro : line 35 is just to see what happen in the code. You can delet... (by CptJY)
splitting numbers and letters from string
 
Given an input string consisting of the first one or two characters followed by a number, I would like to split it into a characters and an integer. What is th...
[2 replies] Last: #include <iostream> #include <string> #include <sstream> using name... (by closed account LA48b7Xj)
compile error (else if statements)
 
I'm working on an assignment that asks the use for a single input that represents both month and day ( mm.dd ), this is the code that i have come up with but it...
[5 replies] Last: No worries, buddy. :) (by integralfx)
Setting values while looping
 
I want to know what's the best way to set values to int or double while looping when you want to change on each loop.So basically I'm having issue when I try to...
[2 replies] Last: C++ is case sensitive, so the compiler should be throwing errors left ... (by integralfx)
input only integer
 
Please someone help me out with this question. I want to input only integer number, except character and even <whitespace> if I enter character or Whitespace >>...
[9 replies] Last: Thank u for all that you guys help me, i did find the way to do it :) ... (by Superman99)
Program will display the same letter over and over
 
So i'm trying to write a program that will prompt the user to keep entering as much student grades as needed. My goal would be to first ask for one grade and ha...
[3 replies] Last: You can write your loop like this... while(cin >> number) { /* ... (by closed account LA48b7Xj)
First time working with classes
 
hey, please help! So the program is suppose to calculates the amount of asphalt needed to pave a road. The calculation must be in cubic yards. Prompt the user ...
[7 replies] Last: NVM ignore that last comment, your way totally shows clarification! (by tweaktwe)
Loop help! (1,2)
 
I am not sure what I am doing. I need this thing to keep running the loop but it will only ask for input once when I run it. What do I need to change and/or add...
[24 replies] Last: Guys, I keep saying this, I can not set it to six times. It says it in... (by closed account ENhkSL3A)
Help need to enter void
 
...
[5 replies] Last: Tysm I got it now.. (by mary9734)
by Lado
Converting from uppercase to lowercase letters and removing signs from a .txt file
 
Hello, Here I have a code that reads a .txt file into arrays. The program reads through the .txt file and counts each word and prints out top 10 words, from 1. ...
[2 replies] Last: Anyone that can create this code can create a function to modify a str... (by SamuelAdams)
program troubles
 
For this program I have to set the class and blank array that I need to load from a file. I'm having a few problems: 1. displayPresident function. Teacher ma...
[9 replies] Last: tempn = pres_array; system("pause"); ++count; Should be : tempn ... (by SakurasouBusters)
by bbqdev
calling functions and top down design
 
So I'm learning how to write code in a 'top down design' and call on functions as needed. First declare them, then define them after main function. I'm a bit c...
[4 replies] Last: Ha! You can use all caps and yell at me if you'd like, I appreciate fe... (by bbqdev)
BUILD error when linking static libraries of QtCore.a
 
up vote 0 down vote favorite I have a file 1) File myStubs.cpp #include <stdlib.h> #include <new> void* qMalloc(size_t sz) {ret...
[no replies]
Template Concepts doubts, from Generic Programming. C++
 
I am using Bjarne Stroustrup's book Programming Principles and practice. this is from chapter 19.3 (templates) page 685, about the so called Concepts he intr...
[1 reply] : http://en.cppreference.com/w/cpp/language/constraints (not part of the... (by ne555)
stream function output to other stream
 
Hello, maybe someone can help me with this, i hope. I'd like to have a function which can stream it's output to an other stream. In the code i have an example ...
[2 replies] Last: Perhaps std::ios::tie()? http://en.cppreference.com/w/cpp/io/basic_io... (by jlb)
Loops
 
11
[no replies]
by fm401
A tough one
 
You have been hired by a presidential campaign (either Hillary Clinton or Donald Trump) to write programs that analyze 2012 election results and help come up wi...
[1 reply] : I have the files but its not letting me put it here. (by fm401)
Content of .csv File to a Vector
 
Hi, first time poster here, I was hoping to get some help on a current assignment here. my c++ skills are rather rudimentary so I apologize in advance and I do ...
[3 replies] Last: Thanks guys, I appreciate the help! My problem has been solved. (by spacemind)
by rlee19
Blackjack deal
 
I know there is a lot of information about blackjack games on here but it is far more advanced than what I need. I simply need to deal a hand with 2 cards. Usin...
[1 reply] : Create a deck of 52 cards. Shuffle the deck. Remove 2 cards from the ... (by AbstractionAnon)
by roots
3 constructors?
 
How would i use 3 constructors in this class? I can make it work with one, but i dont get why you would use three? #include "Employee.h" using namespace st...
[6 replies] Last: So should i use the setters in the constructors then? to make use of ... (by AbstractionAnon)
September 2016 Pages: 1234... 34
  Archived months: [aug2016] [oct2016]

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