Jump to content



Welcome to AstaHost - Dear Guest , Please Register here to get Your own website. - Ask a Question / Express Opinion / Reply w/o Sign-Up!

Toggle shoutbox Shoutbox Open the Shoutbox in a popup

@  agyat : (24 May 2013 - 05:15 PM) O Dear, Where Are You? Without Your Words This Sb Is ..
@  agyat : (23 May 2013 - 01:23 AM) Wow! Mr. Sb Back Home.
@  OpaQue : (23 May 2013 - 12:44 AM) Ting
@  OpaQue : (24 April 2013 - 02:44 PM) I guess, Time to run Mycent script.
@  OpaQue : (24 April 2013 - 02:43 PM) wow.. not much spam. except habatt posting lot of links.. :P
@  yordan : (23 April 2013 - 01:04 PM) You're welcome, agyat. Nice to have been helpful. Second lesson: try full words, "you" instead of "EW".
@  agyat : (23 April 2013 - 05:03 AM) @YORDAN: tHANK EW FOR YOUR FIRST LESSON.   :D
@  yordan : (22 April 2013 - 09:43 PM) @agyat : "why don't you help me", or "please help me", or "please teach us"
@  yordan : (22 April 2013 - 09:42 PM) welcome back, velma
@  velma : (22 April 2013 - 07:51 AM) **yawns** Good to be back, wonder what is going on here :)
@  agyat : (22 April 2013 - 03:50 AM) Oh! so, why don't help me learn english..
@  yordan : (21 April 2013 - 08:38 PM) The goal mentioned by shiu : "learning english, learning computer"
@  agyat : (21 April 2013 - 06:31 PM) WHAT GOAL?
@  yordan : (20 April 2013 - 10:39 AM) yes, that's our goal. simultaneouly learning English and teaching/learning computer using.
@  shiyu : (20 April 2013 - 07:30 AM) learning english,learning computer
@  yordan : (19 April 2013 - 01:11 PM) Oh, I see, it's just a trick in order to force people looking at your texte. Somehow smart, maybe.
@  agyat : (19 April 2013 - 02:54 AM) And of course I know it is not SEO friendly.
@  agyat : (19 April 2013 - 02:52 AM) There may be two possible answers for that ....


1) Shout was posted using mobile keypad.

2) To force people read content carefully and/or with more concentration.
@  agyat : (19 April 2013 - 02:49 AM) There may be two possible answers for that ....
@  yordan : (18 April 2013 - 09:35 PM) however, why this mixing of capital letters in the middle of your text?

Replying to C++: Basic Classes


Post Options

    • Can't make it out? Click here to generate a new image

  or Cancel


Topic Summary

vistz

Posted 25 October 2010 - 11:16 PM

By the way, the pointer thing is one of the most inportant functionalities in C and C++.

And I also know that allocating memory is also an important factor

yordan

Posted 29 September 2010 - 08:58 AM

Of course, there's the addition of pointers that I have to worry about also.

By the way, the pointer thing is one of the most inportant functionalities in C and C++.

vistz

Posted 28 September 2010 - 03:50 PM

Although I haven't done extensive programming in C++, I have found that many of the practices in Java are also implemented in C++. Of course, there's the addition of pointers that I have to worry about also.

Posted 11 December 2009 - 12:28 PM

struct/class difference correctionC++: Basic ClassesA struct is not the "exact same" as a public classFrom C++ standard (11.2.2):"In absence of an access-specifier for a base class, public is assumed when the derived class is declared struct and private is assumed when the class is declared class."Additionally, (11.2):"Member of a class defined with the keyword class are private by default. Members of a class defined with the keywords struct or union are public by default."-reply by richard

Posted 17 May 2009 - 05:40 PM

Thanks u very much ^^. Your notes are very useful for me. I wish all Learn programming books had clear ideals like yours. You make me to love C++ so more!

-reply by Thang Doan Minh

Gr33nN1nj4

Posted 11 August 2008 - 06:02 AM

Access private member function without using friend class

C++: Basic Classes
I want to use private member function in other class , how can I access without using friend.

-question by Aijaz Ahmad


You can't as that is the idea behind private functions/variables, think of them as globals but only for that class. What you could do(assuming you have access to the source) is create a public "proxy" function think simply passes the given variables to the private function. For private variables I would recommend implanting get/set functions.

example of a get/set
class MyClass
{
	public:
		MyClass() // :) never forget to initialize your values.. bad things will happen if you don't
		{
			number = 0;
		}

		virtual int get_number() // Returns the value of the private member number
		{
			return number;
		} 

		virtual void set_number(int value) // Sets number to equal value
		{
			number = value;
		}

	private:
		int number;
};

Posted 09 May 2008 - 07:58 AM

Access private member function without using friend class
C++: Basic Classes

I want to use private member function in other class , how can I access without using friend.

-question by Aijaz Ahmad

Posted 30 January 2008 - 01:15 PM

Thanks...
Very simple illustrations...!

-venkatraman.S

qwijibow

Posted 28 February 2007 - 01:36 PM

And Dont forget to end the class with a semi colon ';'

class
{
};

;)

quinciest

Posted 01 February 2007 - 04:57 AM

thanks for the tutorial
although i've read it in book
but i more understand read this one

Review the complete topic (launches new window)