Beginners - June 2014 (Page 44)

Inheritance
 
Is there any way to find out how many derive classes are inheriting a Base class ?
[2 replies] Last: No. Your base class might be in a library that's used elsewhere. You... (by kbw)
Reference parameter
 
I know the pass by reference i c++ like int func(int& x){ return x; } But on the book i am currently reading. There are somethings that the author doe...
[8 replies] Last: Yup i get it.. Basically what I had in my mind is correct. So it is on... (by skadush)
by Sefi
vector push_back problem
 
Write your question here. Hi, I can't understand why the following code compile. the error is: Description Resource Path Location Type passing 'const std::vecto...
[4 replies] Last: Thanks you! this was the problem. (by Sefi)
Tutoring ?
 
I really need tutoring, I am stressing out. Anyone willing to help? Thanks.
[1 reply] : Start by posting the problem your trying to solve. And then post the c... (by Bdanielz)
Using a function to create an object in a queue
 
I am having some issues wrapping my brain around how use a function to create an object in a queue. Below is my current relevant code. I am creating a pointer f...
[2 replies] Last: Thanks xismn! That was exactly what I needed. I think I was just think... (by q742tt9)
by mehak
inheritance-
 
Write your question here. #include <iostream> using namespace std; class A { private: int a; }; class B:public A { private: int j; }; int main() { ...
[1 reply] : Private members do get inherited. They just can't be accessed direct... (by Lachlan Easton)
Help please (1,2,3)
 
Hi everyone! So I am trying to teach myself programming and I am really beginning to grasp c++ but there is a practice exercise I don't understand. I was hop...
[42 replies] Last: @Yay295 Yes. Your right. I was confusing what he wrote with and aggreg... (by Bdanielz)
Program to copy .dat file to .out file?
 
I'm new to programming and I'm trying to understand what my professor is asking me to do. The instructions say, "Write a program to copy a data file "lab...
[5 replies] Last: Or even better: http://www.cplusplus.com/forum/windows/132701/#msg713... (by S G H)
use of &i in file.write
 
is following syntax right??? if yes then why my compiler is giving error also if this is not right then please tell me, What you think my teacher wanted to t...
[9 replies] Last: using this file.open("useampi.txt", ios::out | ios::in); and for(in... (by danicpp)
Error in including eigen library in c++
 
Hello, I am using a program given in documentation of library eigen. Here is code: #include <iostream> #include <Eigen/Dense> using namespac...
[1 reply] : From the Eigen website: http://eigen.tuxfamily.org/dox/GettingStarted.... (by norm b)
Help with strings
 
I'm trying to make an algorithm to print a triangle of asterisks. For some reason, it sets the output asterisk as only one every time, instead of (maxShapeWidth...
[2 replies] Last: Oh, so it's like I'm just running computations without assigning them ... (by mckryall)
Random number genoraters
 
I was staying at my dads house one day and we were playing a board game when he shows me this rpg called call of cthulhu. It's quite a popular game were you tak...
[1 reply] : C++11 provides facilities for exactly this kind of thing https://ideon... (by Lachlan Easton)
static variable w/in a class
 
Hello, In the Classes II portion of this site's excellent tutorials I encountered some things that I really had to research and hack on by commenting out and...
[3 replies] Last: Thanks! I couldn't figure out why Dummy b wasn't an array, but now... (by SkyCountry)
File IO read lines.
 
I am accessing this file and reading 4 lines of mixed integers and strings. When I output the buffers it seems my loop only reads the first line in the file. ...
[2 replies] Last: Thanks im glad you caught that. I was up all night working on this and... (by JonsOnline)
Comma in a cin command
 
#include<iostream> using namespace std; int main() { int a,b; cout<<"Key in the value of a"; cin>>a; cout<<"Key in the value of b"; cin>>b; ...
[3 replies] Last: So initially, a and b are uninitialized (so they can contain just ... (by long double main)
Change color of specific characters in colsole
 
i have a map for a game that is displayed in the console. now what i would want to do is be able to make the trees (T) colored green and the water (W) blue and ...
[2 replies] Last: Thanks that is really helpful. (by Antone333)
introduction
 
Hello, my name is Danilo, i know i know... its not Sam, James or something like that but it's only name my mama gave me. So ... i might as well enjoy it. :D :P ...
[no replies]
by Blank
Converting currency
 
as the title says, my program converts u.s currency to a foreign countries currency. for some reason when i run the program and i choose a country, its alwa...
[2 replies] Last: thank you!! (by Blank)
by stijn
cout.put(ch)
 
OS: mac osx 10.9 xcode 4.6.3 i don't understand why i need to flush my console output, cout.flush(), in order to make the content of the file visible in the ...
[5 replies] Last: It should flush stream before terminating program. Maybe console win... (by MiiNiPaa)
by iwko
Project Euler #2
 
I'm still getting message "wrong result". #include <iostream> using namespace std; int main() { int n0=0; int n2; int suma=0; ...
[2 replies] Last: First iteration: n1 = 1, n2 = 1, n1 = 1, n0 = 1 1 is odd Second itera... (by keskiverto)
June 2014 Pages: 1... 4243444546... 48
  Archived months: [may2014] [jul2014]

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