Beginners - October 2017 (Page 4)

Displaying and rotating arrays
I need this program to rotate the elements in an array to the left, moving the first position to the...
[1 reply] : std::rotate(arr, arr+1, arr+size); (by Repeater)
Problem with code output
Hello, I am trying to write a code that will calculate a person's average grade by first asking the...
[4 replies] Last: Please, have a look at the following code (I don't know your data, so ... (by Enoizat)
Integer to string issue
I am currently trying to change an integer to a string. I am successful in that, but I am unable to ...
[5 replies] Last: [quote=Repeater]While I certainly agree it's bad form, the page you li... (by Enoizat)
Convert for comparison lowercase variables
Hello all, I am trying to convert the string variable 'answer' with a specific array element. The...
[1 reply] : Pay attention to your types:   “answer” is a “string” but ... (by Duthomhas)
I must be blind or something
Just doing some sample test. I came across this. Weird thing is, I remember doing this same snippet...
[7 replies] Last: > So << is a sequence point now? The concept of sequence points was ... (by JLBorges)
modular functions and nested looping?
For class i'm supposed to write a program that: asks for five scores, finds the min and max, and fin...
[2 replies] Last: thanks, i got it figured out in a really overly complex way though XD... (by iWillAlwaysBeANoob)
Help comparing strings to make a standard output
I have a project where I am making a conversion table, part of the requirement is to have a standard...
[10 replies] Last: Hi, For std::transform, have a look at the example here: http://en.c... (by TheIdeasMan)
by Bizzy
Input/Output operator overloading
Hey, so I've never handled i/o operator overloading before and yet my beginner's course expects me t...
[2 replies] Last: Awesome, thanks! (by Bizzy)
by cash
array menu
I need help with options 6 and 4 in the menu. This is the menu : 0. Create array: Asks user h...
[no replies]
How to call vectors from function?
#include <iostream> #include <vector> using namespace std; vector<float> avesum(float d) { vector<...
[1 reply] : Hello redstorm98, Welcome to the forum. PLEASE ALWAYS USE CODE TAGS ... (by Handy Andy)
Multiple input in a do while loop cin for int
Hello. I have this code: int a; int b; do { cout << "set a to: "; cin >> a; cin.clear(); ...
[5 replies] Last: Thanks for the thorough explanation. I just have to practice using thi... (by holydiver)
What's wrong with my code?
First semester of programming. I am stuck on an assignment. Please ignore the averages and stuff at ...
[3 replies] Last: EDIT Sorry, never mind. I did what you suggested then, I copied my cod... (by Cristina54)
How good is this code, speaking of good coding and optimization for a newbie?
Menu.cpp #include<iostream> #include"suma.h" #include"resta.h" #include"multi.h" #includ...
[1 reply] : In no particular order: using namespace std; is dangerous. Putting ... (by Repeater)
how to pass variables in function parameters
I've learned that using non-const variables in file namespace is bad practice (and of course I don't...
[6 replies] Last: Ok thanks! Got it down now everything is working as expected! the lea... (by freshii)
this is my homework for tomorrow and i don`t now how to do it PLEAS HELP write a c++ program to ou...
[6 replies] Last: You don't need the string string amjad_alghamdi; , I suggest remove t... (by Chervil)
by Rostam
Nested loops exercise
So I can't seem to find the reason why when i input one into this program, it prints the "-" repeate...
[1 reply] : Let me know if you see anything I missed! Line 7 double sum; sum i... (by Chervil)
something wrong
my first and second array can be displayed perfectly; but there is something wrong with the third o...
[3 replies] Last: #include <iostream> #include <iomanip> #include <valarray> using name... (by lastchance)
Loop help with functions and input/output text files
So I have an assignment to write a program that reads from a text file, manipulates the data, then i...
[1 reply] : One suggestion is to open both input and output files in main(). Pass ... (by Chervil)
Help on LAB 3.3 answer keep coming 0 " Working with String Input and Type Casting"
// Lab 3 percentage.cpp // This program will determine the percentage // of answers a student got co...
[1 reply] : totalPoints = ( numCorrect/numQuestions); This is doing integer div... (by Chervil)
In std::vector there a fucntion call push_back is there something equivalent to that in std::map
[3 replies] Last: std::map also offers an overload of operator for insertion: # incl... (by gunnerfunner)
October 2017 Pages: 123456... 32
  Archived months: [sep2017] [nov2017]

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