Beginners - September 2011 (Page 12)

how to access private members from derived class
 
Hi, I'm very new C++, i juz touched on Classes. How do i access the data member of a base class using a class method of a derived class? Example of wat...
[3 replies] Last: Make m_name a protected member and use private access inheritance, the... (by gpotw)
really need help
 
I just started to study the C++ Programming Language. I'm done with the condition statements and jump statements. An idea came to my mind to create a simple pro...
[4 replies] Last: You can compare ASCI table's values. (by andrezc)
binary system
 
how can i write sum of two numbers in binary system in c++?i really need help
[11 replies] Last: oh sorry :D (by chipp)
True of False?
 
In C++, both ! and != are relational operators.
[11 replies] Last: It's something worth remembering I guess... Not really, unless yo... (by hanst99)
Strcmp()
 
Hi everyone, Can anyone tell me what is wrong with the following use of strcmp(), i know that it is supposed to return 0 if the comparison if the C-strings are...
[3 replies] Last: I always get a 1 with this: You always get 1 ? cout<<"comparison:... (by andywestken)
Roman Numerals
 
Could anyone explain the errors please (in beginners terms if possible!) Thanks in advance Graham Warning 1 warning C4390: ';' : empty controlled state...
[2 replies] Last: Many thanks, sorted Graham (by GraemeR)
How to get a decimal answer when dividing variables.
 
I'm writing a simple program using if statements. I can't get the 2nd condition to give an accurate answer. I'm dividing two integer variables in an attempt to ...
[3 replies] Last: What do you think ceil(a) does? (Think carefully...) Also can you ex... (by Mathhead200)
by leo235
dynmaic memory allocation
 
OK so this program here: int b; char *a= new char ; cin >> a; cout << a; delete a; a= new char ; cin >> a; cout << a; cin >>b; works wonderfully ...
[18 replies] Last: [quote=leo235]when i do that I get the assertion failure (sic) I thin... (by closed account zb0S216C)
copy constructor for objects with vectors
 
Hi - I have an object with a couple of vectors in it: class MyClass { private: Mod* pMod; std::vector<SocReg> regI; std::vector<SocReg> regQ; ...
[12 replies] Last: ne555: I believe that is the desired behavior in this case. This progr... (by mzimmers)
Real Roots of the Quadratic Formula
 
I can't get an answer for the quadratic; it just skips right to the "Try again?" int main() { double a, b, c; double Pos; double Neg; char tryagain;...
[7 replies] Last: I recommend adding a few output statements right after input to ensure... (by Michael37)
where to put data files for vc++ before compile
 
hi, i downloaded a tutorial from the net and compiled it. when i ran it in vc++ 2010 express IDE, the program terminated with out reading the data file. her...
[3 replies] Last: hi firedraco: is there a way to provide the path to the file in pr... (by robertme)
How to write a function?
 
I'm confused about how to write a function. I'm writing a text adventure and it's becoming complicated writing a bunch of nested if statements and loops. I want...
[1 reply] : http://www.cplusplus.com/doc/tutorial/functions/ Basically, the funct... (by malice)
How does cin work?
 
I have read topics about cin and how it works but I do not understand. By the way what is &ostream? I am a beginner so please nothing to advanced.
[1 reply] : h30097.www3.hp.com/cplus/iostream.pdf Sorry, but there's no simple wa... (by ascii)
How easy is C++?
 
I know programming is hard to learn but how easy would C++ come to me? I am currently taking a course in visual basic(no choice part of my major). After i the V...
[7 replies] Last: Or the fantastic Microsoft Foundation Classes!! <-- Joke, please don'... (by ascii)
by cob
Backwards program!
 
So, once again, my coding is rustier than I thought! I try to do all of it without tutorials, make the knowledge mine, blah blah. Anyways, this program is sup...
[4 replies] Last: Danny: The assignment required each loop as previous knowledge. I na... (by cob)
by cob
Grading Program
 
Hello all! I've been getting back into C++ but instead of re-learning the material, I decided to look up exercises and see where I stand. Apparently, I'm si...
[6 replies] Last: I fixed the problem and got the grading program working! I meant to p... (by cob)
nested switches
 
cout<< " Welcome to the phone company menu \n" << "For information about your account press "<< phone_account_info<< endl << "Fo...
[4 replies] Last: thanks that worked (by bbathel)
Where is my code getting a smiley face from?
 
Well the program I'm writing is simple, and it's more of a hobby project, but anyways, my program is for some reason getting a smiley face and puting it in the ...
[8 replies] Last: oh, lol ya that probably would describe how I felt a little better. (by c0d3Man15)
Is such a function declaration legal?
 
In a well-designed project, I found the following declaration of a function (called cptwvv) in a header file: int cptwvv(int, double, fftw_complex*, int, ...
[4 replies] Last: Thanks, zhuge. (by subjugater)
Error Cannot Solve
 
Can someone tell me how to fix these errors! I've tried working on this for a couple hours and I've had no progress at all! else( operation == 'M' || opera...
[4 replies] Last: ... I think I'm gonna choose a new compiler... the one I've been using... (by Code Assassin)
September 2011 Pages: 1... 1011121314... 48
  Archived months: [aug2011] [oct2011]

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