Click here to Skip to main content
15,895,011 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Richard MacCutchan30-Sep-13 21:41
mveRichard MacCutchan30-Sep-13 21:41 
GeneralRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Member 103174295-Oct-13 7:56
Member 103174295-Oct-13 7:56 
GeneralRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Richard MacCutchan5-Oct-13 20:46
mveRichard MacCutchan5-Oct-13 20:46 
AnswerRe: Numerical processing in C/C++ - text(books) resources? OT Pin
CPallini2-Oct-13 0:50
mveCPallini2-Oct-13 0:50 
AnswerRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Albert Holguin8-Oct-13 5:47
professionalAlbert Holguin8-Oct-13 5:47 
GeneralRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Vaclav_8-Oct-13 6:18
Vaclav_8-Oct-13 6:18 
GeneralRe: Numerical processing in C/C++ - text(books) resources? OT Pin
Albert Holguin8-Oct-13 7:21
professionalAlbert Holguin8-Oct-13 7:21 
QuestionAccess specifier in multiple inheritance Pin
TheHelenLee30-Sep-13 10:24
TheHelenLee30-Sep-13 10:24 
Hi, I'm trying to teach myself C++ and was playing with an example from a website. If I only inherit from Derived class, I could change the access level of Identity method from protected to public by declaring public Derived::Identity in class DerivedChild. However, if I have multiple inheritance, I'm not able to access that method. Could someone tell me what I did wrong?

Thanks,

Helen

#include <iostream>
#include <string>

class Base
{
protected:
  int m_nValue;

public:
  Base(int nValue)
	: m_nValue(nValue){}

  void Identity() {std::cout << "I am a Base" << std::endl;}
};

class Derived
{

public:
  Derived(){};

protected:
  void Identity(){
	std::cout << "I am a Derived" << std::endl;
  };
};

class DerivedChild : public Base, public Derived
{
public:
  DerivedChild(int nValue)
	: Base(nValue){}

  Derived::Identity;

};

int main()
{

  DerivedChild cChild(9);
  cChild.Base::Identity();
  cChild.Derived::Identity(); // This is still protected even when I modified the access to Public in DerivedChild class

  return 0;
}

AnswerRe: Access specifier in multiple inheritance Pin
.dan.g.30-Sep-13 18:51
professional.dan.g.30-Sep-13 18:51 
AnswerRe: Access specifier in multiple inheritance Pin
«_Superman_»30-Sep-13 19:05
professional«_Superman_»30-Sep-13 19:05 
QuestionRe: Access specifier in multiple inheritance Pin
TheHelenLee30-Sep-13 19:25
TheHelenLee30-Sep-13 19:25 
AnswerRe: Access specifier in multiple inheritance Pin
pasztorpisti30-Sep-13 23:11
pasztorpisti30-Sep-13 23:11 
QuestionAdodc : how to retrieve single value into EditBox Pin
coolerfantasy29-Sep-13 21:02
coolerfantasy29-Sep-13 21:02 
QuestionRe: Adodc : how to retrieve single value into EditBox Pin
David Crow30-Sep-13 3:07
David Crow30-Sep-13 3:07 
AnswerRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy30-Sep-13 19:42
coolerfantasy30-Sep-13 19:42 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
Freak301-Oct-13 0:46
Freak301-Oct-13 0:46 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy1-Oct-13 20:05
coolerfantasy1-Oct-13 20:05 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
Freak302-Oct-13 1:50
Freak302-Oct-13 1:50 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy2-Oct-13 20:01
coolerfantasy2-Oct-13 20:01 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
David Crow3-Oct-13 5:56
David Crow3-Oct-13 5:56 
GeneralRe: Adodc : how to retrieve single value into EditBox Pin
coolerfantasy5-Oct-13 19:46
coolerfantasy5-Oct-13 19:46 
Questionhow to configure googletest for "test code covearge" in visual studio 2010 [modified] Pin
pk jain29-Sep-13 19:35
pk jain29-Sep-13 19:35 
AnswerRe: how to configure googletest for "test code covearge" in visual studio 2010 [modified] Pin
Richard MacCutchan29-Sep-13 20:53
mveRichard MacCutchan29-Sep-13 20:53 
QuestionMonitoring application memory usage Pin
dushkin29-Sep-13 7:33
dushkin29-Sep-13 7:33 
SuggestionRe: Monitoring application memory usage Pin
David Crow29-Sep-13 16:40
David Crow29-Sep-13 16:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.