Beginners - December 2020 (Page 11)

How to load vectors with multiple parts
 
I am writing a program for searching for books in a text file, "The library", and I am trying to load the contents of the text file into a vector. This vector u...
[6 replies] Last: Further consider: while (std::getline(ins, title, '|') && (ins >> y... (by seeplus)
for loop question
 
Hello I am reading a piece of code, and it contains a for loop that is not what I am used to seeing (that basic for loop format) and I am hoping someone could h...
[2 replies] Last: Expressed with a while loop it'd look like this: string temp; ... (by coder777)
by yem
Make Output and Input disappear
 
Hey, Usually when I write a program with no GUI, the output and user input remains on the screen of the CMD for the duration of the program. How can I control ...
[7 replies] Last: Thanks! (by yem)
Class template - declaring data type <T> which contains value for particular element
 
I have a file called grad.dat which contains data on numerous post-secondary graduates. The records are formatted as follows: <year province degree gender numEm...
[1 reply] : May be something along these lines: #include <iostream> #include <st... (by JLBorges)
Something is wrong with my math.
 
Hi everyone, hope everyone is doing great. so I have this problem with this code. The program is asking to pick (M, 5, 50000, 6) for the input. The answer is su...
[1 reply] : The code you show hardcodes numberOfPersons to 1. And I think in calc... (by dutch)
Please help me what is wrong in my code?
 
#include<iostream> using namespace std; int main () { double sub1,sub2,sub3,sub4; float avg; cout<<"Enter your grade in CC 113A: "; cin>>sub1; c...
[1 reply] : #include<iostream> using namespace std; int main () { double sub1... (by againtry)
Program to calculate payroll continuously runs with no output.
 
This is my first semester of computer science and the program i wrote has no errors in at least that its telling me. I think it might be stuck in one of the loo...
[2 replies] Last: The reason for the infinite loop is that you are closing the time file... (by newbieg)
by CeErre
Issues with Functions
 
Whats Up my nerds!!!!! I am having issues using functions. Im tryin to use two separate functions using the code provided that will calculate the circumference ...
[4 replies] Last: Found the error! Thanks! //Grupo # 2 //Rodriguez Rivera, Carlos A.... (by CeErre)
Setting up Visual Studio BlockOut2 Code ?
 
Hello. I need help to set up this open source code , on Visual Studio 2013/2019 or any kind of online code website, where I can adjust the code, compile it...
[no replies]
Help with video rental program using linked lists and arrays
 
Hi, I am trying to program a video rental checkout that reads in a file of given movies that the user can then search. **I am not able to use anything outside ...
[5 replies] Last: If you want to do separate arrays, it's not a big deal either way; it'... (by Ganado)
by kmce
iterators. iterator.begin()
 
Hi, I am trying to learn about vectors and iterators, and I have just read that the .begin() and .end() functions that belong to the vector return an iterator, ...
[8 replies] Last: if i was able to check what was stored in the memory of it and the ... (by mbozzi)
Declaring vectors for class objects within another class
 
Hi there So I’m still working on my test-RPG game and have another question. I now have a (sort of) working inventory but I’m not really happy with it. T...
[5 replies] Last: #include "filename.h" means "copy the contents of filename.h right h... (by Repeater)
If statement only
 
Hello everyone! Please help me, what's wrong with my code? I'm trying an if only statement with multiple conditions because that's what our prof instructed. I j...
[4 replies] Last: Hello newbie prog10, PLEASE ALWAYS USE CODE TAGS (the <> formatting... (by Handy Andy)
December 2020 Pages: 1... 91011
  Archived months: [nov2020] [jan2021]

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