Click here to Skip to main content
16,017,015 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: File Path from handle Pin
Randor 11-Nov-08 22:47
professional Randor 11-Nov-08 22:47 
GeneralRe: File Path from handle Pin
revanth198511-Nov-08 23:17
revanth198511-Nov-08 23:17 
GeneralRe: File Path from handle Pin
Randor 11-Nov-08 23:31
professional Randor 11-Nov-08 23:31 
GeneralRe: File Path from handle Pin
revanth198511-Nov-08 23:43
revanth198511-Nov-08 23:43 
GeneralRe: File Path from handle Pin
SRKSHOME12-Nov-08 0:47
SRKSHOME12-Nov-08 0:47 
QuestionRe: File Path from handle Pin
David Crow12-Nov-08 3:15
David Crow12-Nov-08 3:15 
GeneralRe: File Path from handle Pin
Randor 12-Nov-08 1:21
professional Randor 12-Nov-08 1:21 
QuestionCPU stimulation C++ Pin
124211-Nov-08 18:46
124211-Nov-08 18:46 
#include <cstdlib>
#include <iostream>
//#include<conio>
//#include<math>
//#include<stdio>


#define NumberOfTasks 50 // easy change number of tasks
#define MaxClock 100 // easy change clock interval for tasks to run
#define MaxTaskTime 0.001 // easy change randomazing for tasking
#define NumerOfCPUs 5 // number of multiple pc's used
#define MaxQSize 10
using namespace std;
struct t
{
int id; int runprocess; int duration;
}task[NumberOfTasks];
struct c{
int idle;
int nextideltime;
}cpu[NumerOfCPUs];
struct queue{
// int Qcounter;
// int termcounter;
// int Qcounter==L;
// int empty
// { if (int L=0; Qcounter<maxqsize;l++)>
t task;
}q[MaxQSize];

int main(int argc, char *argv[])
{
int clock=0;
int qindex=0;
int i;
// cpus
for(int ik=0;ik<numerofcpus;ik++)>
{cpu[ik].idle=0;cpu[ik].nextideltime=0;}
// tasks
for(i=0;i<numberoftasks;i++)>
{
task[i].runprocess=int(MaxTaskTime*rand());
cout<<"task:"<< task[i].runprocess << "\n";
}

// system
while(clock<=MaxClock)
{
cout <<"clock:" << clock << endl;
for(int ij=0;ij<numberoftasks;ij++)>
{if(task[i].runprocess==clock)
{}
// if -- for enter the system

} // for -tasks
for(int ik=0;ik<numerofcpus;ik++)>
{if(cpu[ik].nextideltime==clock) cpu[ik].idle=0;
} // for make cpu idle
for(int ik=0;ik<numerofcpus;ik++)>
{if ( cpu[ik].idle==0 && qindex!=0)
{
}
} // for q - enter one task from q to cpu

clock++;
} //while




system("PAUSE");
return EXIT_SUCCESS;
}


here i am suppose to create a queuing and statistics box.. showing how many task get queue or terminated if queue is full... i just don't have any idea how to do that part..


help!!
AnswerRe: CPU stimulation C++ Pin
David Crow12-Nov-08 3:35
David Crow12-Nov-08 3:35 
GeneralRe: CPU stimulation C++ Pin
124212-Nov-08 6:45
124212-Nov-08 6:45 
GeneralRe: CPU stimulation C++ Pin
124212-Nov-08 6:54
124212-Nov-08 6:54 
QuestionProblem with IDispatch::GetTypeInfo Pin
mvkvibin11-Nov-08 17:44
mvkvibin11-Nov-08 17:44 
QuestionConvert doc/txt file to PDF using C++. Pin
Subrat 470826611-Nov-08 17:26
Subrat 470826611-Nov-08 17:26 
AnswerRe: Convert doc/txt file to PDF using C++. Pin
bob1697211-Nov-08 18:32
bob1697211-Nov-08 18:32 
GeneralRe: Convert doc/txt file to PDF using C++. Pin
Saurabh.Garg11-Nov-08 22:41
Saurabh.Garg11-Nov-08 22:41 
GeneralRe: Convert doc/txt file to PDF using C++. Pin
bob1697212-Nov-08 3:18
bob1697212-Nov-08 3:18 
AnswerRe: Convert doc/txt file to PDF using C++. Pin
Cedric Moonen11-Nov-08 20:32
Cedric Moonen11-Nov-08 20:32 
QuestionHow to pass data from MFC to Win 32 Console through windows messaging [modified] Pin
Darrel Q Pham11-Nov-08 15:45
Darrel Q Pham11-Nov-08 15:45 
AnswerRe: How to pass data from MFC to Win 32 Console through windows messaging Pin
Darrel Q Pham17-Nov-08 15:34
Darrel Q Pham17-Nov-08 15:34 
QuestionNeed help converting raw PCM data into streaming audio Pin
lavagoblin11-Nov-08 12:42
lavagoblin11-Nov-08 12:42 
AnswerRe: Need help converting raw PCM data into streaming audio Pin
enhzflep11-Nov-08 14:00
enhzflep11-Nov-08 14:00 
AnswerRe: Need help converting raw PCM data into streaming audio Pin
Mark Salsbery11-Nov-08 15:35
Mark Salsbery11-Nov-08 15:35 
QuestionPull Downs Menu Items Pin
BobInNJ11-Nov-08 11:33
BobInNJ11-Nov-08 11:33 
AnswerRe: Pull Downs Menu Items Pin
lavagoblin11-Nov-08 11:59
lavagoblin11-Nov-08 11:59 
GeneralRe: Pull Downs Menu Items Pin
BobInNJ11-Nov-08 12:24
BobInNJ11-Nov-08 12:24 

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.