Beginners - October 2015 (Page 14)

by ortymd
Error opening a file second time
 
I'm making a group of students. Three constructors are used. In CourseList constructor data is read from a file ("courses"). Program reads everything ok first t...
[no replies]
C++ teaching methods
 
Hello. I started learning C++ programming outside school as an extra a few weeks ago. My teacher tells me that I should use arrays instead of vectors, even if i...
[5 replies] Last: [quote=DDomjosa]Is it even worth to continue learning there then? For... (by closed account E0p9LyTq)
by noodel
If
 
Can you tell me what's wrong? int main() { float a,b,c; cin>>a>>b>>c; if (a+b>0 && b+c>0 && a+c>0) { if((a=b) && (b=c))...
[2 replies] Last: damn, i knew that, THANKS! (by noodel)
C++-Virtual function as private
 
Hi All, Could you help me with the output for below programs? class base{ private: virtual void display() //Please note I have made this c...
[13 replies] Last: Diamond problem happens until you start UML and Design Correctly. You... (by Ericool)
by Torex
How to compare array values and put them in another array
 
Hey guys, I'm having some problems with this exercise: I have two arrays A and B. Using for loop, I need to check what elements are greater than variable x=...
[11 replies] Last: Well I don't want to steal cires thunder but what I did was implement ... (by closed account 48T7M4Gy)
c++ upcasting,downcasting
 
Hi All, class base { public: virtual void display() {cout<<"Base"<<endl; } }; class derived : public base { publ...
[8 replies] Last: downcasting and upcasting is legal , prefer using dynamic_cast or stat... (by Ericool)
How to use an object returned from another function?
 
Take a look at the very simple code below: #include <iostream> using namespace std; class Employee { private: string ename; double esa...
[3 replies] Last: @cire: Wow, I feel really stupid with this one, lol. I was missing the... (by Arslan7041)
Homework Assignment (For Loops) Need HELP!
 
I don't understand how to do it, please help :( Assignment Plan and code a program utilizing one or more repetition structures to solve the following problem...
[3 replies] Last: Looks fine , I mostly like you put 0.87 instead of 1 - 0.13 , but you ... (by Ericool)
2-dimensional char array
 
Hi, how do I make a 2-dimensional square array of single letters and make it output in a matrix-like fashion? This is what I have so far, but I can't find a way...
[2 replies] Last: Thank you for fixing it, that works perfectly! Not closing the thread ... (by DDomjosa)
why doesn`t void main() work in c++ 14
 
why does my compiler(c++14) says me that main() must return int? #include<iostream> using namespace std; void main() { int a; cout<<a; I trie...
[9 replies] Last: thank you people for your support,i got what you guys are trying to sa... (by vaidhyesh)
What is argc, char* argv[1]?
 
Hello everyone! I know this one might sound stupid but i must ask this one. I have always known that after #include <iostream> using namespace ...
[2 replies] Last: Thanks JLBorges (by longberns)
C array and division help
 
So, I wrote a program to take user input for a high and low temperature, and then took a file name from that user. I then used an array to read the data and sto...
[1 reply] : Hi, You are doing integer division: both range and total are int... (by TheIdeasMan)
C++ website bot
 
So I've been learning basic C++ and I've been getting a good grasp on it. My goal was to learn C++ to create software to aid me wherever I needed it. Specifical...
[1 reply] : There are probably many alternatives but Visual C++ has the functional... (by closed account 48T7M4Gy)
Basic password code
 
Im trying to match user input to a set password (running a loop to repeat the question after failure) My problems are that I dont know how to check for speci...
[16 replies] Last: :) (by closed account 48T7M4Gy)
error while comparing char[] and string
 
Hello! i've been working on a addressbook program and there's function to find a contact, and i've used the function '.compare()' which is found in string heade...
[8 replies] Last: lol thanks. comparing a sting and a character array works! and yes, as... (by Shashank Setty)
Help with Programming
 
Hello. I am a beginner in programming and wanted to know if someone can help. I have no idea what I am doing or where to even start. If anyone can help me on wh...
[5 replies] Last: That's OK. Apology accepted. :) You really should try playing around ... (by closed account 48T7M4Gy)
Question about classes
 
I am trying to make a player using a Class as a setup. These are my files: Player.h #pragma once #include <iostream> #include <string> using namespa...
[3 replies] Last: Thank you. That was the problem! (by JohnKon)
Problems with functions and uninitialized local variables
 
Very new to programming, in a beginner's course. We're just starting to learn functions and were given an assignment to code as follows (use functions to get s...
[6 replies] Last: It works, but technically you don't even need, on line 27, int userIn... (by Ispil)
Input file into array / removing from array / Cstring
 
Sorry for the big question. I am trying to input a file with a delimiter of | into an array and I was supposed to use cstring instead of string. The file goes i...
[no replies]
by HI281
Help!!
 
I am writing my first C++ program and it stops after asking for the input. Here is what I was asked to do: Write a program that prompts a user for the desire...
[3 replies] Last: #include <iostream> #include <cmath> using namespace std; int main... (by closed account 48T7M4Gy)
October 2015 Pages: 1... 1213141516... 57
  Archived months: [sep2015] [nov2015]

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