Click here to Skip to main content
15,886,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to make a c++ executable Pin
Member 1398247130-Sep-18 14:29
Member 1398247130-Sep-18 14:29 
GeneralRe: How to make a c++ executable Pin
Richard MacCutchan30-Sep-18 21:06
mveRichard MacCutchan30-Sep-18 21:06 
AnswerRe: How to make a c++ executable Pin
CPallini30-Sep-18 21:48
mveCPallini30-Sep-18 21:48 
GeneralRe: How to make a c++ executable Pin
Member 139824711-Oct-18 6:37
Member 139824711-Oct-18 6:37 
GeneralRe: How to make a c++ executable Pin
Maximilien1-Oct-18 6:58
Maximilien1-Oct-18 6:58 
GeneralRe: How to make a c++ executable Pin
Member 139824711-Oct-18 8:54
Member 139824711-Oct-18 8:54 
AnswerRe: How to make a c++ executable Pin
Member 140094495-Oct-18 15:30
Member 140094495-Oct-18 15:30 
QuestionAccess a class instance based on its ID Pin
meerokh29-Sep-18 6:50
meerokh29-Sep-18 6:50 
I have two queues in my program,queue and waitingQueue. queue contains the workpackage instances that are created by user . After creating a workpackge by a user, if he decides to yield it, i want to change the status of created workpackage to waiting and add it to the waitingQueue. Creation of workpackage returns a unique id of the package that is added to the queue. This is what i want to acheive:

//Done in user application
int packageId = creatpackage(Function, arguments); // this create a package and adds it to a normal queue
wait(packageId); //wait call yeild function that is part of my library

//Inside library
void classname::yeild(int packageId){
   set the state of workpackage to Waiting
   add the package to WaitingQueue
if(there is another package in WaitingQueue)
      Make a switch context to it
else
     Go to normal queue and execute the package
}


My question is how can i access the workpackage state after which yeild function was called. I thought of accessing it based on id somehow(is it even possible??) Based on my full scenario, is there any better approach then what i am doing??
AnswerRe: Access a class instance based on its ID Pin
Richard MacCutchan30-Sep-18 1:55
mveRichard MacCutchan30-Sep-18 1:55 
GeneralRe: Access a class instance based on its ID Pin
meerokh30-Sep-18 3:52
meerokh30-Sep-18 3:52 
GeneralRe: Access a class instance based on its ID Pin
Richard MacCutchan30-Sep-18 4:45
mveRichard MacCutchan30-Sep-18 4:45 
QuestionCan anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 4:11
Member 1398247125-Sep-18 4:11 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 4:49
Dar Brett25-Sep-18 4:49 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 5:00
Member 1398247125-Sep-18 5:00 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 5:02
Dar Brett25-Sep-18 5:02 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 5:06
Member 1398247125-Sep-18 5:06 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Dar Brett25-Sep-18 5:19
Dar Brett25-Sep-18 5:19 
GeneralRe: Can anyone tell me if c++ is worth learning? Pin
Member 1398247125-Sep-18 5:21
Member 1398247125-Sep-18 5:21 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
Joe Woodbury25-Sep-18 5:51
professionalJoe Woodbury25-Sep-18 5:51 
AnswerRe: Can anyone tell me if c++ is worth learning? Pin
CPallini25-Sep-18 21:18
mveCPallini25-Sep-18 21:18 
QuestionCAsynSocket Client Question Pin
ForNow23-Sep-18 4:10
ForNow23-Sep-18 4:10 
AnswerRe: CAsynSocket Client Question Pin
Richard Andrew x6423-Sep-18 5:37
professionalRichard Andrew x6423-Sep-18 5:37 
GeneralRe: CAsynSocket Client Question Pin
ForNow23-Sep-18 5:43
ForNow23-Sep-18 5:43 
AnswerRe: CAsynSocket Client Question Pin
Victor Nijegorodov23-Sep-18 8:23
Victor Nijegorodov23-Sep-18 8:23 
QuestionC Programming Pin
Member 1399372921-Sep-18 22:29
Member 1399372921-Sep-18 22:29 

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.