Hi everybody :)
I'm modifying a C++ code in VC++ 2005
my code snippet
- void BandwidthAllocationScheduler::insert(
-
Message* msg,
-
BOOL* QueueIsFull,
-
const int priority,
-
const void *infoField,
-
const clocktype currentTime,
-
TosType* tos
-
)
-
-
{
-
QueueData* qData = NULL;
-
int queueIndex;
-
unsigned int sfid; //service flow id
-
-
int maxSustainedRate; // maximum sustained traffic, bps
-
int minReservedRate; // minimum reserved traffic rate, bps
-
int numFlows; //number of flows
-
int bwAll;
-
int bwGranted; // number of bytes
-
int tempBwReq; //number of bytes
-
int sflow;
-
int i;
-
int DOT16_UPLINK_SERVICE_FLOW;
-
int DOT16_DOWNLINK_SERVICE_FLOW;
-
-
for (i = 0, i < numFlows; i++)
-
{
-
if sFlow->sfDirection == DOT16_UPLINK_SERVICE_FLOW
-
sFlow* MacDot16SsAddServiceFlow;
-
-
if DsFlow->sfDirection == DOT16_DOWNLINK_SERVICE_FLOW
-
sFlow* MacDot16BsAddServiceFlow;
-
}
-
bwAll = BwGranted;
-
if bwAll < minReservedRate MacDot16SsScheduleBandwidthRequest;
-
if bwAll > minReservedRate
-
//tag/mark extra slots
-
tempBwReq = dot16Ss->outScheduler[
-
bwRec->serviceFlowIndex - 1]
-
->bytesInQueue(bwRec->queuePriority); // tempBw to Permanent
-
sFlow->bwRequested = tempBwReq; //update Bwreq
-
-
}
but i get the following error when i compile it
Quote:
..\libraries\developer\src\sch_bandwidthallocation .cpp(113) : error C2143: syntax error : missing ';' before ')'
..\libraries\developer\src\sch_bandwidthallocation .cpp(115) : error C2061: syntax error : identifier 'sFlow'
..\libraries\developer\src\sch_bandwidthallocation .cpp(118) : error C2061: syntax error : identifier 'DsFlow'
..\libraries\developer\src\sch_bandwidthallocation .cpp(121) : error C2065: 'BwGranted' : undeclared identifier
..\libraries\developer\src\sch_bandwidthallocation .cpp(122) : error C2061: syntax error : identifier 'bwAll'
..\libraries\developer\src\sch_bandwidthallocation .cpp(126) : error C2061: syntax error : identifier 'bwAll'
..\libraries\developer\src\sch_bandwidthallocation .cpp(131) : error C2065: 'sFlow' : undeclared identifier
..\libraries\developer\src\sch_bandwidthallocation .cpp(131) : error C2227: left of '->bwRequested' must point to class/struct/union/generic type
type is ''unknown-type''
..\libraries\developer\src\sch_bandwidthallocation .cpp(604) : error C2761: '{ctor}' : member function redeclaration not allowed
..\libraries\developer\src\sch_bandwidthallocation .cpp(605) : error C2447: '{' : missing function header (old-style formal list?)
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\cl.EXE"' : return code '0x2'
Stop.
NMAKE : fatal error U1077: '"C:\Program Files\Microsoft Visual Studio 8\VC\BIN\nmake.EXE"' : return code '0x2'
Stop.
can someone tell me, where did i go wrong? thx :)