LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Blogs
User Name
Password

Notices

Old

this pointer - C++

Posted 03-13-2012 at 11:10 AM by Anisha Kaul
Updated 03-13-2012 at 10:25 PM by Anisha Kaul

Quote:
The this pointer is a hidden pointer inside every class's non-static function which points to the class's particular object through which the concerned function is called.
Example:
Code:
class A
{
    private:
        int rollNumber;

    public:
	A (int rollNum)
	{
	    rollNumber = rollNum;
	}

	void setRollNumber (int rollNum)
	{
	    rollNumber = rollNum;
	}
};
...
Senior Member
Posted in C++, Pointers
Views 557 Comments 0 Anisha Kaul is offline
Old

My birthday presents

Posted 03-03-2012 at 05:38 AM by Anisha Kaul
Updated 03-03-2012 at 05:56 AM by Anisha Kaul

So, I turned 29 on 18th Feb 2012. Thought of presenting
myself with the toys I was longing for quite a while.
  • Nikon D3100 (body only).
  • Nikon AF-S NIKKOR 50mm f/1.8G.
  • Bajaj Oven Toaster Griller (3 in 1) 28 ltrs.


Owned Canon PowerShot SX210 IS for about two years.
That camera produces horrible outputs in low light.
No wide apertures. Horrible noise at ISO 200.
I was discouraged. Discouraged to the level that I had
totally abandoned...
Senior Member
Views 17010 Comments 11 Anisha Kaul is offline
Old

Why and how to use Mutex locks - Pthreads

Posted 02-27-2012 at 11:06 AM by Anisha Kaul
Updated 05-21-2012 at 01:51 AM by Anisha Kaul

Problem:
Underlying operating system may schedule the threads on the basis of some algorithm which works on time limit (threads may be allowed to run only for certain durations of time, thus preventing the other threads from starvation), priority (higher priority threads may interrupt the lower priority threads during their execution), or some other factor.

These factors may cause a thread to sleep before it completes its task fully. Another thread may get scheduled meanwhile...
Senior Member
Posted in PThreads
Views 6261 Comments 3 Anisha Kaul is offline
Old
Rating: 2 votes, 5.00 average.

How to reverse a linked list? - C

Posted 02-01-2012 at 05:49 AM by Anisha Kaul



Code:
void reverseLinkedList ()
{
	linkedList *pointer1;
	linkedList *pointer2;
	
	pointer1 = NULL;
	pointer2 = head->next;
	
	while (pointer2 != NULL)
	{
		head->next = pointer1;
		
		pointer1     = head;
		head         = pointer2;
		pointer2     = pointer2->next;
	}
...
Attached Files
File Type: txt reverseLinkedList.txt (1.8 KB, 5 views)
Senior Member
Posted in Data structures
Views 906 Comments 0 Anisha Kaul is offline
Old

Flattened rice AKA Poha (in Hindi)

Posted 01-25-2012 at 06:17 AM by Anisha Kaul
Updated 05-09-2012 at 11:33 PM by Anisha Kaul

Ingredients:
  • 1 table spoon small yellow Mustard seeds (Aka Sarson in Hindi)
  • 4 small Green chillies (Aka Hari mirch in Hindi) thinly chopped.
  • 1 and 1/2 table spoon fresh Ginger (Aka Adrak in Hindi) finely grated.
  • 1/2 table spoon Salt.
  • 2 medium Onions thinly chopped.
  • 1/4 table spoon Turmeric powder (Aka Haldi in Hindi).
  • 4 cups Flattened rice.
  • Juice of half lemon.
  • Oil for frying.

Directions:
  • Wash the Flattened Rice. Keep it wide spread in a holed dish. Drain the water,
...
Senior Member
Posted in Recipes
Views 4365 Comments 2 Anisha Kaul is offline

  



All times are GMT -5. The time now is 06:16 AM.

Main Menu

My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration