Beginners - June 2018 (Page 18)

While loop with counter
 
I need to make a while loop to count to 100 with only 10 numbers on each line and setw(5) to separate them. I am struggling to get this done correctly. I can do...
[4 replies] Last: You are welcome. And if you happen to read this reply, here is a way t... (by Misenna)
File I/0 function help
 
Hello, I am trying to take this step by step I code my True/False function complete but I am getting an error and need help figuring it out. I still need to do ...
[4 replies] Last: After line 31, do a simple check like this: if (typeOfQuestion == 1... (by Uk Marine)
Read File
 
No error, but it does not read file My class include string acno2, name_st, date2 and address_st; and I want to add new student: account ac; fstrea...
[3 replies] Last: So it does open the file correctly, but fails at some point when readi... (by Ganado)
visual studio project template
 
Hi all, I got two noob questions regarding visual studio (2017): 1. I am looking for a way to create a default project configuration so i don't have to set i...
[3 replies] Last: it's a really weird environment to work in but I've gotten the GUI bui... (by zaphraud)
Vectors C++ Out Of Range Exception
 
I was working on an assignment where I have to work with vector of strings, However when I run the program it throws and Exception of being out of range when _n...
[3 replies] Last: But you're pushing nothing into it. Check for yourself: cout << "Si... (by Repeater)
by skoepa
Getting an unhandled exception
 
Hello I have been following along with this Handmade Hero game and I am at the end of Day 4 I an unable to run the program because of an this error "Exception t...
[2 replies] Last: I am not sure exactly, I have been copying his code word for word just... (by skoepa)
by t009
Can't get Class Array within Another Class Working
 
I am working on a beginner project that requires an array of Class_A to be an object of Class_B Below is what I am trying class Customers{ std::string ...
[3 replies] Last: I need to use an array for this. Need? As in " I must practice low-l... (by keskiverto)
Enrollment system program
 
I'm making a program that simulates enrollment for students and teachers etc. In this program I should be able to add students, teachers and subjects. I'm done ...
[no replies]
Inventory & Item IDs
 
I'm practicing some C++ and was wondering what the best approach is to creating a basic Inventory System, where item's have their own ID assigned to them. I'm t...
[5 replies] Last: I've been messing around with this code for a few days and understand ... (by George1993)
What book to read after starting out with c++ by tony gaddis?
 
I asked this question in StackOverflow and they didn't answer my question and just linked me to an old question that did not have the answer I was seeking. I h...
[4 replies] Last: I'd recommend http://www.informit.com/store/c-plus-plus-standard-libra... (by rjphares)
trouble with class constructor
 
hi. I have a trouble with my class constructor. my code: class User{ private : std::string displayname; std::string username; std::string password; pu...
[6 replies] Last: My Pleasure :) (by H00G0)
by zapshe
How To Use Files In Code?
 
My question is, if I had a program that would, lets say, shuffle through a provided .txt file and count the number of times the word "I" showed up. How would I ...
[2 replies] Last: Thanks John87Connor for showing me fstream! I've yet been able to real... (by zapshe)
Convert Counter-Controlled While Loop To For Loop
 
hello everyone, I have written a program that will print numbers 1 through 10 as well as show what they are when multiplied by 2 and by 10. I have written it us...
[1 reply] : int main () { for(int x=-1;x<10;x++) { cout << setw(6) << x ... (by koopey)
Mac user, a few begginer questions like libraries
 
Background: Formal study in c and other languages 30 years ago, but due to a local downturn in the industry in the early 90s I stopped coding. Re-educated to ph...
[2 replies] Last: Ok, thanks. Seems opinion hasnt changed in 30 years then. I'll just h... (by Graveling)
Reading a string from text file
 
Hi everyone! I have a problem when working with string in text file. For example, I have a text: <w:drawing><wp:inline distT="0" distB="0" distL="0" distR="0"><...
[12 replies] Last: This is what I would do, String operations, find "cx="" and read every... (by H00G0)
Any advice to avoid this error?
 
I'm getting an error: "variable or field 'biggestNumb' declared void." I have a task to tell the console 3 integers and it has to sort out the greatest one. I'm...
[3 replies] Last: What is the proper result, if input is 5 2 5 (by keskiverto)
Placing validation with multiple functions
 
Hello! I'm currently working on a class problem where I am calculating wind chill and cloud base based of user inputs. I have the program functioning to all th...
[5 replies] Last: Before C++11 the keyword auto had a different meaning. Here it was u... (by keskiverto)
Tic-Tac-Toe
 
I am having trouble coding this Tic Tac Toe assignment for my CIS course. The prompt for the assignment is below. "There is modification to the original assi...
[13 replies] Last: Icy1 wrote: @dhayden, You should harden the input a bit more I'm alw... (by dhayden)
A Function that has a return type of a parent class returning its child
 
I have a parent class and want a function that returns an object that is a type of one of its children. Is this possible to do in C++? As of right now I have a ...
[2 replies] Last: That helped a lot! Thank you. It did lead to one more problem though. ... (by Too Explosive)
by catee
Middle number square
 
Hello I'm new here and I need to do this task: Find all 5-digit integers whose middle square is equal to the sum of the digits and how many are they? Make ...
[10 replies] Last: #include <iostream> using namespace std; // Tut, tut - global variab... (by lastchance)
June 2018 Pages: 1... 16171819
  Archived months: [may2018] [jul2018]

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