Type: Posts; User: Muthuveerappan
Search took 0.02 seconds.
August 31st, 2011, 09:52 PM
Thanks Laserlight, you are rite
I was just going through Cocoa (Objective C's framework) and saw the method alloc which was inherited from the base class (NSObject) and seemed it was something...
August 31st, 2011, 01:07 PM
In the below example, inside the implementation of the static function f1 is there a way to determine whether A::f1() or B::f1() invoked f1 ?
August 22nd, 2011, 01:33 PM
Yes GCDEF is correct.
Just thought i would add some points (correct me if i am wrong):
C-Strings are treated as an array of characters ending with a null character '\0'
July 12th, 2011, 10:44 AM
Thanks Skizmo and Philip, I am just a bit confused with definition vs initialization.
The reason I am confused is that because the below mentioned program compiles successfully (a1 is not defined...
July 12th, 2011, 10:38 AM
Thanks superbonzo for clarifying that
July 12th, 2011, 05:46 AM
Thanks Nuzzle, I suppose it is better to treat it as a feature of C++ since i am not fully aware of what goes behind the scene.
July 12th, 2011, 05:46 AM
My understanding was that all static data members in a class needs to be initialized.
In one of the programs, I forgot to initialize a static composite data member (what i mean by composite...
July 10th, 2011, 07:09 AM
As per my understanding (correct me if i am wrong):
1) Yes B inherits A, but display() is a function that belongs to A and is only inherited by B.
It was possible for A::display() to invoke...
July 10th, 2011, 06:46 AM
Laserlight - Yes you are correct, my 2nd example follows LSP.
I found it interesting that B::f1() could be accessed outside of class B. In this case class A::display() (base class function)...
July 10th, 2011, 06:26 AM
Thanks Nuzzle and Laserlight
Just to summarize the reason how this happened:
1) Access is checked by the compiler at compile time, the fact that it is A::f1() public allows the compiler to let it...
Thanks Laserlight, I agree that the design doesn't follow the Liskov substitution principle.
However my question is:
B::f1() is private and shouldn't be accessible outside the class B, however i...
As per my understanding (I could be completely wrong, so feel to correct me)
- BaseClass is used by multiple teams.
- you want to use the same BaseClass but want to use it DerivedUtil instead of...
A is the base class
B is the derived from class A
A has a public virtual function f1()
B has a private virtual function f1()
B::f1() not accessible using an object of class B however...
Thank you so much !! I was breaking my head over it for a long time...
I am trying to create a function pointer to std::endl
I get a compilation error in line number 36, where I am trying to assign the function pointer of std::endl to a pointer variable.
December 16th, 2010, 03:28 AM
Thanks a lot !!
Just feel timeb might be compiler specific (I could be completely wrong)
We are working on mac and windows... so i thought it would be better to use boost library (posix time)....
December 14th, 2010, 11:25 PM
Thanks a lot !!
gmtime actually resolves the problem because it is the GMT time
I did check timezone, tzname, tzname, it doesn't show the correct names, but thats...
December 14th, 2010, 06:10 AM
Thanks a ton !! I wouldn't have guessed that in my dreams !!
Windows shows it as 8....
Strange it actually needs to be 8hrs .... :) not sure why it is 7:30 ... though the timezone is properly...
December 14th, 2010, 05:37 AM
I have a doubt regarding time_t
I am initializing a time_t variable to 0.
When I display it, it shows "Thu Jan 1 07:30:00 1970" ?
I expected it to Thu Jan 1 00:0:00 1970 since t1 was...
June 22nd, 2010, 11:21 PM
I am a newbie to boost graph library (BGL).
1) To build a graph with vertices with unique ids - Able to do this
2) To get the vertex containing a specific idsI have created a graph with...
Thanks a ton !!
Will go through them and come back with the doubts that I have.
Thanks again all of you !!
I am looking for a Library / function / formula to check if a point is inside a polygon.
Assuming the polygon has N sides, and the co-ordinates are given of each vertex is given.
April 16th, 2010, 06:53 AM
Thank you so much for all your replies.
I had this vague view that there was a function called "any" ... hahah .. I was so wrong.
I suppose std :: find would suit my needs.
April 16th, 2010, 05:09 AM
I wanted to know if there was a way to check if a variable was inside a set of values.
Like in the below given example, I want to know if n1 is either 5, 8, 27 or 2567
Is there a better way...
April 16th, 2010, 02:40 AM
Thanks a lot Codeplug, will read through that article and come back.
Yeah I wish boost had more detailed documentation on how and in what situations to use them.
Click Here to Expand Forum to Full Width
This is a Codeguru.com survey!