C Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me

The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.

Go Back   Dev Shed ForumsProgramming LanguagesC Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old July 2nd, 2002, 10:19 PM
darcher's Avatar
darcher darcher is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2001
Location: world
Posts: 293 darcher User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 31 m 47 sec
Reputation Power: 12
Question interface for code

Hi, I want to do an interface, with text boxes in Visual C++ such that I can enter my data in that text box, and then click on the submit button,
as the data goes in the program should accept it and start running.

Thanks in advance,

below are my codes:

got to make changes to give input in this Pstatic.pp file and Peql.cpp //file.The inputs are: /* Get buffer length for each traffic type buffer */
// QVBRVoD.FgetBL(1200);
// QCLD.FgetBL(100);
// QVBRVi.FgetBL(1200);
// QCOD.FgetBL(3294967295); /* ULONG_MAX value */
//1200,100,1200 and 3294… are the variable bit rate to change.You can see this //command below and in Peql.cpp file.

Pstatic.cpp
/************************************************************
* *
* Static Bandwidth Allocation *
* *
*************************************************************/

#include <stdlib.h>
#include <conio.h>
#include <fstream.h>
#include <iostream.h>
#include <limits.h>
#include <math.h>
#include <time.h>
#include <stddef.h>

ofstream fPout, fSout, fQout, fQDout, fBWout, fout, ft;

#include "c:/office/master/program/queue.h"
#include "c:/office/master/program/source.h"
#include "c:/office/master/program/strategy.h"

void main()
{
#include "c:/office/master/program/declare.h"

/* Get buffer length for each traffic type buffer */
QVBRVoD.FgetBL(1200);
QCLD.FgetBL(100);
QVBRVi.FgetBL(1200);
QCOD.FgetBL(3294967295); /* ULONG_MAX value */

/* simulate for Time slots seconds */
/* To get and validate the whole parameters table, set slot <= 200 to avoid large output files*/
/* Else to get only results set slot <= 2000000 */
for (slot = 0; slot <= 2000000; /*4294967295*/ slot++) {
if (slot == 20000) {
#include "c:/office/master/program/init.h"
}

#include "c:/office/master/program/check.h"
#include "c:/office/master/program/tran-a.h"

/* Start new BW allocation cycle */
if (slot == BW.Fnext()) {
/* This block is for static BW allocation */
BW.FcalBW(slot);
};

BLVBRVoD += QVBRVoD.FgetQL();
BLVBRVi += QVBRVi.FgetQL();
BLCLD += QCLD.FgetQL();
BLCOD += QCOD.FgetQL();
};

#include "c:/office/master/program/result.h"
}

Peql.cpp
/****************************************************************
* *
* Bandwidth Allocated Proportional to Expected Queue Length *
* *
*****************************************************************/

#include <stdlib.h>
#include <conio.h>
#include <fstream.h>
#include <iostream.h>
#include <limits.h>
#include <math.h>
#include <time.h>
#include <stddef.h>

ofstream fPout, fSout, fQout, fQDout, fBWout, fout, ft;

#include "c:\office\master\program\source.h"
#include "c:\office\master\program\queue.h"
#include "c:\office\master\program\strategy.h"

void main()
{
unsigned long BL1, BL2, temp;
#include "c:\office\master\program\declare.h"

/* BL1, Buffer length VBRVoD, VBRVi */
/* BL2, Buffer length CLD */
BL1 = 1400;
BL2 = 100;
//TBL = 2*BL1 + BL2;
/* Get buffer length for each traffic type buffer */
QVBRVoD.FgetBL(1400);
QCLD.FgetBL(100);
QVBRVi.FgetBL(1400);
QCOD.FgetBL(3294967295); /* ULONG_MAX value = 4294967295*/

/* simulate for Time slots seconds */
/* To get and validate the whole parameters table, set slot <= 200 to avoid large output files*/
/* Else to get only results set slot <= 2000000 */
for (slot = 0; slot <= 200; /*4294967295*/ slot++) {
if (slot == 20000) {
#include "c:\office\master\program\init.h"
}

#include "c:\office\master\program\check.h"
#include "c:\office\master\program\tran-a.h"

/* Start new BW allocation cycle */
if (slot == BW.Fnext()) {
/* This block is for BW allocation prop. to expected QL */
QLVBRVoD += QVBRVoD.FgetQL();
if (QLVBRVoD > BL1)
QLVBRVoD = BL1;
QLVBRVi += QVBRVi.FgetQL();
if (QLVBRVi > BL1)
QLVBRVi = BL1;
QLCLD += QCLD.FgetQL();
if (QLCLD > BL2)
QLCLD = BL2;
temp = QLVBRVoD + QLCLD + QLVBRVi;
//fSout << temp << endl;
BW.FcalBW(slot,QLVBRVoD,QLCLD,QLVBRVi,temp);
//BW.FcalBW(slot,temp);
QLVBRVoD = 0;
QLVBRVi = 0;
QLCLD = 0;
VBRVoD_Slot = true;
CLD_Slot = false;
VBRVi_Slot=false;
VBRVoD_End = false;
CLD_End = false;
VBRVi_End = false; };
BLVBRVoD += QVBRVoD.FgetQL();
BLVBRVi += QVBRVi.FgetQL();
BLCLD += QCLD.FgetQL();
BLCOD += QCOD.FgetQL();
};

#include "c:\office\master\program\result.h"
}

Reply With Quote
  #2  
Old July 17th, 2002, 07:07 PM
danaoredson danaoredson is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jul 2002
Location: Minnesota
Posts: 0 danaoredson User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
very, very strange coding style.

#includes in the middle of your code?
absolute paths to included files?

very strange

Reply With Quote
Reply

Viewing: Dev Shed ForumsProgramming LanguagesC Programming > interface for code

Developer Shed Advertisers and Affiliates



Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.

© 2003-2013 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap