LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 04-20-2015, 11:54 PM   #1
shyjuu
Member
 
Registered: Mar 2015
Posts: 47

Rep: Reputation: Disabled
Explain this single line of code


Scheduler::instance().clock()

Can anyone explain what this line of code means

Thanks in advance

What i understand is clock is function of class instance
and :: is scope operator which specifies instance and clock belongs to Scheduler class
 
Old 04-21-2015, 12:38 AM   #2
pan64
LQ Addict
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 21,838

Rep: Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308Reputation: 7308
Is it C++ or java?
Scheduler is a class, instance() is a function which will probably give/return an instance of that class and .clock() will invoke the function named clock of that particular instance (of class Scheduler).
But hard to say more without knowing your environment.
 
1 members found this post helpful.
Old 04-21-2015, 12:56 AM   #3
shyjuu
Member
 
Registered: Mar 2015
Posts: 47

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pan64 View Post
Is it C++ or java?
Scheduler is a class, instance() is a function which will probably give/return an instance of that class and .clock() will invoke the function .
It is C++

Thanks for the reply

What does this means Packet* p = alloc();
if (n > 0)
p->allocdata(n);
return(p);
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Python : Will any one explain me this code, please ? aarsh Programming 6 04-03-2011 09:37 AM
Could someone help explain this code? MTK358 Programming 27 04-01-2010 09:44 PM
Could somebody explain how this line of code works... trist007 Programming 2 05-12-2009 01:50 PM
help to explain the shell code ! nillgump Linux From Scratch 1 10-11-2008 11:09 AM
explain me some c code alaios Programming 4 11-28-2005 11:27 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 07:09 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration